You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some projects there is no need in consistent logging of queries, but when some strange behavior was noticed. In this case it would be helpful to be able to disable decorating through spring cloud config.
I might, for instance, like to use P6Spy or datasource-proxy in a test configuration but not in prod; I don't see anything in the README to address this kind of approach.
@geoffreywiseman one option is disable decorating at non test environments (application.properties/yml in main sources) - decorator.datasource.enabled=false, it's mentioned in the very end of README. And then override this option only for tests using either separate test config file or @SpringBootTest(properties = "decorator.datasource.enabled=true"), there are also different options supported by Spring Boot.
In this case p6spy/datasource-proxy and decorator code will be on the classpath, but decorating will be disabled. If you want completely exclude it from the classpath you can configure your build tool to make starter a test dependency.
For some projects there is no need in consistent logging of queries, but when some strange behavior was noticed. In this case it would be helpful to be able to disable decorating through spring cloud config.
see p6spy/p6spy#460
The text was updated successfully, but these errors were encountered: