springboot1.5.17集成p6spy打印完整mybatis sql

springboot集成p6spy,和其他普通工程集成一样,都要创建自定义的log实现类,添加spy.properties到资源目录,不同的是在springboot的配置文件properties里按照如下配置即可:

springboot1.5.17集成p6spy打印完整mybatis sql_第1张图片

spring.datasource.driver-class-name=com.p6spy.engine.spy.P6SpyDriver
spring.datasource.url=jdbc:p6spy:oracle:thin:@192.168.0.100:1521:orcl
#spring.datasource.url=jdbc:oracle:thin:@192.168.0.100:1521:orcl
spring.datasource.username=ftfs
spring.datasource.password=1
spring.datasource.type: com.alibaba.druid.pool.DruidDataSource
#spring.datasource.driver-class-name: oracle.jdbc.driver.OracleDriver

 

你可能感兴趣的:(java)