parent
34269042ea
commit
ed80e3fa8a
|
@ -4,15 +4,15 @@ server.tomcat.basedir=./basedir
|
|||
# 多个项目放在nginx下同个端口,通过该配置区分
|
||||
server.servlet.context-path=/dispose
|
||||
# 配置数据源
|
||||
spring.datasource.url=jdbc:mysql://10.88.77.65:33061/ci_dispose_v2?serverTimezone=Asia/Shanghai&zeroDateTimeBehavior\
|
||||
=convertToNull&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=h0K0_8u
|
||||
#spring.datasource.url=jdbc:mysql://172.28.72.118:33061/ci_dispose_v2?serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull&useUnicode=true
|
||||
#spring.datasource.url=jdbc:mysql://10.88.77.65:33061/ci_dispose_v2?serverTimezone=Asia/Shanghai&zeroDateTimeBehavior\
|
||||
# =convertToNull&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true
|
||||
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
#spring.datasource.username=phoenix
|
||||
#spring.datasource.password=ENC@yr1dDL7FO8J642rqx5sD7Q==
|
||||
#spring.datasource.username=root
|
||||
#spring.datasource.password=h0K0_8u
|
||||
spring.datasource.url=jdbc:mysql://172.28.72.118:33061/ci_dispose_v2?serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull&useUnicode=true
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
spring.datasource.username=phoenix
|
||||
spring.datasource.password=Hy@rfph32
|
||||
|
||||
# 配置连接池
|
||||
spring.datasource.schema=classpath:test_db/unit_test.sql
|
||||
|
|
|
@ -28,9 +28,10 @@ public class CfgFileSecurityConfigure {
|
|||
public EncryptionPropertyResolver encryptablePropertyResolver() throws IOException {
|
||||
InputStream is = ClassLoader.getSystemResourceAsStream("git.properties");
|
||||
assert is != null;
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
|
||||
String password = "";
|
||||
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
|
||||
try {
|
||||
log.info("Version Information:");
|
||||
while (true) {
|
||||
String val = reader.readLine();
|
||||
|
@ -44,6 +45,11 @@ public class CfgFileSecurityConfigure {
|
|||
password = val.substring("git.commit.id=".length());
|
||||
}
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
log.error("EncryptablePropertyResolver exception, used default password");
|
||||
} finally {
|
||||
reader.close();
|
||||
}
|
||||
|
||||
return new EncryptionPropertyResolver(password);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue