用户工具

站点工具


java:druid
<dependency>
   <groupId>com.alibaba</groupId>
   <artifactId>druid</artifactId>
   <version>1.1.14</version>
</dependency>
<property name="filters" value="config,wall,stat,slf4j" />
<property name="connectionProperties" value="druid.stat.mergeSql=true;config.file=file:///home/admin/druid-pool.properties" />
  • 密码保护
mvn dependency:copy-dependencies -DoutputDirectory=target  //复制依赖
java -cp target/druid-1.1.14.jar com.alibaba.druid.filter.config.ConfigTools yourpassword  //输出私钥、公钥、密串
spring.datasource.druid.master.password=密串
spring.datasource.druid.master.connect-properties.config.decrypt=true  //保管好原始密码,私钥可以抛弃
spring.datasource.druid.master.connect-properties.config.decrypt.key=公钥,能解密,不能暴露配置内容
spring.datasource.druid.filter.config.enabled=true
java/druid.txt · 最后更改: 2019/09/28 21:58 由 admin