白名单批量上传

pull/1/head
bmpandlcm 10 months ago
parent fe5ad126da
commit 06d5fc4e77

@ -40,9 +40,9 @@ public class MyEnvironmentPostProcessor implements EnvironmentPostProcessor {
String DBType = properties.getProperty("WhiteDBType") == null ? "1" : properties.getProperty("WhiteDBType");
Newproperties.load(new FileInputStream(NewPath));
properties.setProperty("spring.logback.logPath",PathUtil.TomcatPath+"/logs");
properties.setProperty("spring.datasource.url",properties.getProperty("WhiteDBUrl"));
properties.setProperty("spring.datasource.username",properties.getProperty("WhiteDBUserName"));
properties.setProperty("spring.datasource.password",PassWordUtils.decrypt(properties.getProperty("WhiteDBPassWord")));
properties.setProperty("spring.datasource.url",properties.getProperty("DBUrl"));
properties.setProperty("spring.datasource.username",properties.getProperty("DBUserName"));
properties.setProperty("spring.datasource.password",PassWordUtils.decrypt(properties.getProperty("DBPassWord")));
if(DBType.equals("1")){
properties.setProperty("spring.datasource.driver-class-name",Newproperties.getProperty("sqlClassName"));
properties.setProperty("spring.datasource.validationQuery",Newproperties.getProperty("sqlvalidationQuery"));

@ -12,13 +12,13 @@ public class MybatisPlusConfig {
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
if(PropertiesUtil.getValue("WhiteDBType").equals("1")){
if(PropertiesUtil.getValue("DBType").equals("1")){
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.SQL_SERVER2005));
}else if(PropertiesUtil.getValue("WhiteDBType").equals("2")){
}else if(PropertiesUtil.getValue("DBType").equals("2")){
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.ORACLE));
}else if(PropertiesUtil.getValue("WhiteDBType").equals("3")){
}else if(PropertiesUtil.getValue("DBType").equals("3")){
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.DM));
}else if(PropertiesUtil.getValue("WhiteDBType").equals("4")){
}else if(PropertiesUtil.getValue("DBType").equals("4")){
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
}
return interceptor;

@ -184,7 +184,7 @@ public class PubTools {
}
public static String getDBType(){
return PropertiesUtil.getValue("WhiteDBType");
return PropertiesUtil.getValue("DBType");
}
public static String GetHex(Object o)

Loading…
Cancel
Save