为方便入门,数据库登录用户、密码不再加密!
This commit is contained in:
parent
95e54ad11a
commit
ea1411246e
Binary file not shown.
@ -37,10 +37,16 @@ mybatis-flex:
|
||||
ds1:
|
||||
# 指定为HikariDataSource
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
# mysql数据库
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/ruoyi-flex?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
||||
username: root123
|
||||
password: Root@369---0000
|
||||
username: root
|
||||
password: Root@369
|
||||
#postgresql数据库
|
||||
# driver-class-name: org.postgresql.Driver
|
||||
# url: jdbc:postgresql://localhost:5432/ruoyi-flex?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
|
||||
# username: postgres
|
||||
# password: postgres@369
|
||||
|
||||
hikari:
|
||||
#连接池名
|
||||
|
@ -43,10 +43,16 @@ mybatis-flex:
|
||||
PrimaryDS:
|
||||
# 指定为HikariDataSource
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
# mysql数据库
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/ruoyi-flex?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
||||
username: root123
|
||||
password: Root@369---0000
|
||||
username: root
|
||||
password: Root@369
|
||||
#postgresql数据库
|
||||
# driver-class-name: org.postgresql.Driver
|
||||
# url: jdbc:postgresql://localhost:5432/ruoyi-flex?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
|
||||
# username: postgres
|
||||
# password: postgres@369
|
||||
|
||||
hikari:
|
||||
#连接池名
|
||||
|
@ -12,13 +12,14 @@ public class Decipher implements DataSourceDecipher {
|
||||
@Override
|
||||
public String decrypt(DataSourceProperty property, String value) {
|
||||
//解密数据源URL、用户名、密码,通过编码支持任意加密方式的解密
|
||||
//为了减轻入门用户负担,默认返回原字符,用户可以定制加解密算法
|
||||
|
||||
String result = "";
|
||||
|
||||
switch (property) {
|
||||
case URL -> result = value;
|
||||
case USERNAME -> result = value.substring(0, 4);
|
||||
case PASSWORD -> result = value.substring(0, 8);
|
||||
case USERNAME -> result = value;
|
||||
case PASSWORD -> result = value;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user