p6spy

Spring4.0 集成 p6spy 打印真正的执行sql

自作多情 提交于 2019-11-30 01:21:30
前言:ssm框架集成的log4j打印的sql日志信息时,sql语句中总是出现? 这种预编译sql的符号。而有时候sql过长,参数过多的情况下,查看完整sql以及拷贝sql入工具执行的情况下,比较麻烦。所以这里我使用集成p6spy打印完整sql方案解决这种问题。 1。准备p6spy的jar包 <dependency> <groupId>p6spy</groupId> <artifactId>p6spy</artifactId> <version>3.0.0</version> </dependency> 2。在spring中配置数据源代理 <!-- p6spy sql dynamicDataSources:数据源或者是动态代理数据源--> <bean id="dynamicDataSource" class="com.p6spy.engine.spy.P6DataSource"> <constructor-arg> <ref bean="dynamicDataSources"/> </constructor-arg> </bean> 3。新建一个spy.properties文件 ### # #%L # P6Spy # %% # Copyright (C) 2013 P6Spy # %% # Licensed under the Apache License, Version 2.0

Only show effective SQL string P6Spy

痞子三分冷 提交于 2019-11-29 07:54:50
I'm using p6spy to log the sql statements generated by my program. The format for the outputted spy.log file looks like this: current time|execution time|category|statement SQL String|effective SQL string I'm just wondering if anyone knows if there's a way to alter the spy.properties file and have only the last column, the effective SQL string, output to the spy.log file? I've looked through the properties file but haven't found anything that seems to support this. Thanks! In spy.properties there is a property called logMessageFormat that you can set to a custom implementation of

Anything better than P6Spy? [closed]

谁说胖子不能爱 提交于 2019-11-29 03:42:47
I am planning to use P6Spy to intercept database statements within our architecture. However, I noticed on the P6Spy website that the last release of the software was back in 2003. Is there anything out there that is better or should I just stick with P6Spy? Nuno Furtado We still use P6Spy with our Weblogic 8.1.5 with EJB2.0 and it works charms. I'm about to try and integrate it with Weblogic 10.3 and EJB3.0 P6Spy has been under active development ago for a while now. The 2.0 version has also just been released. It now supports use without any configuration file for some use cases. It has also

Anything better than P6Spy? [closed]

旧街凉风 提交于 2019-11-27 17:57:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I am planning to use P6Spy to intercept database statements within our architecture. However, I noticed on the P6Spy website that the last release of the software was back in 2003. Is there anything out there that is better or should I just stick with P6Spy? 回答1: We still use P6Spy with our Weblogic 8.1.5 with