1pom
<dependency> <groupId>p6spy</groupId> <artifactId>p6spy</artifactId> <version>3.7.0</version> </dependency>
2.自定义输出格式P6SpyLogger
3.配置spy.properties
4.修改yaml中,url中增加了p6spy
datasource:
jdbc-url: jdbc:p6spy:oracle:thin:@host:1521:instance
driver-class-name: com.p6spy.engine.spy.P6SpyDriver