Moduliths Events JPA module not working properly when used with Spring Boot DevTools
See original GitHub issueParameter 0 of constructor in org.moduliths.events.jpa.JpaEventPublicationConfiguration required a bean of type ‘org.moduliths.events.jpa.JpaEventPublicationRepository’ that could not be found.
Spring Boot Version 2.4.4, Also tried downgrading to 2.3.10 with no luck.
The following issue solution did not help either:
Upgrading to 1.1.0-RC2
solved the issue.
_Originally posted by @igler in https://github.com/odrotbohm/moduliths/issues/166#issuecomment-818947681_
Getting this with all versions of the library when starting my application. Any assistance would be greatly appreciated @odrotbohm
Issue Analytics
- State:
- Created 2 years ago
- Comments:9
Top Results From Across the Web
Moduliths Events JPA module not working properly ... - GitHub
I just checked the setup of the auto-configuration we deploy here: it assumes – if you use Spring Boot – that Spring Data...
Read more >spring boot app does not reload despite spring boot dev tools ...
have you tried this command in application.properties: spring.devtools.livereload.enabled=true. check this resource:
Read more >DevTools in Spring Boot 1.3
The aim of this module is to try and improve the development-time experience when working on Spring Boot applications. To use the module...
Read more >Overview of Spring Boot Dev Tools - Baeldung
This article will try to cover the benefits we can achieve using the new functionality. We'll cover the following topics: Property defaults ...
Read more >Salespoint Framework Changelog
#363 - Upgrade to Moduliths 1.2.1. #362 - Upgrade to Spring Boot 2.5.5. #356 - Upgrade Asciidoctor Maven Plugin to 2.2.1.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve fixed the issue with DevTools. If you’re not using automatic schema creation with Hibernate, you’d have to take care of the schema creation for the publication table yourself. I guess you can mimic what Hibernate is doing, enable SQL logging in a sample project and just copy the output into a Flyway script or the like for now. I’d like to focus this ticket on the DevTools aspect and mark this resolved. We of course need to improve on the schema creation but that’s likely much more effort as we have to provide this for multiple databases etc., which warrants a new ticket.
Regarding the actual interaction with the database, I’d have to again ask for a reproducing example as “nothing is ever being persisted” can’t really be investigated without one and we have tests and samples (one linked to above), that actually show the interaction happening and the log working.
Let’s tackle this, one by one: if you use
@EnableJpaRepositories
explicitly, you completely disable Boot’s auto-configuration for JPA and Spring Data JPA repositories. That means that repositories and entities are only picked up from packages you define. Can you try addingorg.moduliths.events.jpa
to the list of packages you declare explicitly?Regarding the “non-public interface is not defined by the given loader” I’ll have to investigate. Is DevTools in play here by accident? I’ve experienced the classloader arrangement causing a few issues here and there.