forked from github/dataease
Merge pull request #5211 from dataease/pr@dev@fixdataset
fix: Excel包含Emoji字符会导致导入失败
This commit is contained in:
commit
b4be67ff37
@ -227,6 +227,9 @@ public class EngineService {
|
||||
mysqlConfiguration.setPort(Integer.valueOf(matcher.group(2)));
|
||||
mysqlConfiguration.setDataBase(matcher.group(3).split("\\?")[0]);
|
||||
mysqlConfiguration.setExtraParams(matcher.group(3).split("\\?")[1]);
|
||||
if(StringUtils.isNotEmpty(mysqlConfiguration.getExtraParams()) && !mysqlConfiguration.getExtraParams().contains("connectionCollation")){
|
||||
mysqlConfiguration.setExtraParams(mysqlConfiguration.getExtraParams() + "&connectionCollation=utf8mb4_general_ci");
|
||||
}
|
||||
mysqlConfiguration.setUsername(env.getProperty("spring.datasource.username"));
|
||||
mysqlConfiguration.setPassword(env.getProperty("spring.datasource.password"));
|
||||
engine.setConfiguration(new Gson().toJson(mysqlConfiguration));
|
||||
|
Loading…
Reference in New Issue
Block a user