Code Monkey home page Code Monkey logo

Comments (3)

maybeec avatar maybeec commented on September 4, 2024

Got it to work :/

If you want to have reusable JPARepository implementations in separate modules, you have to always specify @EnableJpaRepositories(repositoryFactoryBeanClass = GenericRepositoryFactoryBean.class) again and again although the SpringBootApp already comes with this repositoryFactoryBeanClass configured...

from devon4j.

hohwille avatar hohwille commented on September 4, 2024

Sorry, I did not see this earlier. Seems you figured it out yourself. That is nice. However, I do not get where you had to specify the @EnableJpaRepositories again and again in your code?
I only have one SpringBootApp per application even it is modularized. Are you talking about JUnit configs? Arent you following devonfw and using the SpringBootApp itself as config for component and subsystem tests? Maybe we can derive some learning or a documentation hint from this problem.

from devon4j.

hohwille avatar hohwille commented on September 4, 2024

The stacktrace from spring-data and esp. the root cause error message is kind of confusing, but if you read it carefully you get that the repository does not implement newDslAlias. That is what only happens if GenericRepositoryFactoryBean is used to create the repository.
In case you want to modularize and have repositories in different maven modules that you also want to test within their defining module, I would create an abstract configuration / spring app that defines the basic configuration setup like the jpa repo config and derive both your test configs as well as your real SpringBootApp from it.

from devon4j.

Related Issues (20)

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.