Comments (5)
Just adding the db-util dependency to the pom.xml and calling
SQLStatementCountValidators .reset()
andassertSelectCount()
was not enough.
Yes, that's not enough. You also need to wrap the DataSource
as explained in this article. Now, doing that in Spring Boot is more work than with a plain Spring application, and that's would explain why you needed that starter.
Anyway, I'm going to close this issue since it is Spring Boot responsibility to add support for other libraries, not the other way around.
from db-util.
Thanks for the very quick answer. I've read that article multiple times and the following line led me to believe that all you needed was to add the maven dependency to set up the interceptor:
Since itβs already available in Maven Central Repository, you can easily use it by just adding this dependency to your pom.xml [...]
In any event there was no indication of what else I could do, so I thought that the technique I describe could be useful for other users.
from db-util.
I can't add the dependency to the project. What if someone wants to use it with Java EE?
This is like adding a Spring dependency into Log4J.
from db-util.
I agree and I'm not asking for you to do that, just documenting my experience to help other users that may find themselves in the same position (which I imagine is a common one, since it's provided by a bunch of popular gems in Rails and core Django functionality since 2011; and we haven't been having any less N+1 problems with JPA/Hibernate than I've had with other ORM's, even after I read your excellent book on the subject).
Anyway, no action asked from you. Feel free to document this or let Google take care of it. Thanks again for your work, if there were just a few others like you around, life in the Java/Spring ecosystem would be much less painful.
from db-util.
I think it's better if you send me a Pull Request with the README.md file updated with this info for Spring Boot.
from db-util.
Related Issues (10)
- Null argument in function with @Retry causes NullPointerException HOT 8
- Remove dependency on Logback logging framework HOT 2
- Create a JUnit 5 extension to for clearer tests HOT 2
- How to prevent SELECT queries from SequenceGenerator HOT 5
- DB-util incompatible with flexipool-spring boot starter HOT 3
- Logback vulnerabilities in 1.0.6 release HOT 3
- Migrate the utilities to Hypersistence Utils and archive this project
- SQLStatementCountMismatchException is interpreted as a test error instead of a test failure by some test runners HOT 2
- Release a new version within latest datasource-proxy migration HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from db-util.