Giter Site home page Giter Site logo

Comments (5)

vladmihalcea avatar vladmihalcea commented on May 18, 2024

Just adding the db-util dependency to the pom.xml and calling SQLStatementCountValidators .reset() and assertSelectCount() 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.

rodelrod avatar rodelrod commented on May 18, 2024

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.

vladmihalcea avatar vladmihalcea commented on May 18, 2024

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.

rodelrod avatar rodelrod commented on May 18, 2024

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.

vladmihalcea avatar vladmihalcea commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.