multipledatabases | Multiple Databases with shared entity classes | Object-Relational Mapping library
kandi X-RAY | multipledatabases Summary
kandi X-RAY | multipledatabases Summary
Multiple Databases with shared entity classes in Spring Boot and Java.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- The in - memory database transaction manager
- The in - memory entity manager bean
- The in - memory datasource
- The physical database transaction manager bean
- Bean for persistent database entity manager bean
- Create persistent data source
- Save a person
- Save person in memory
- Save a person in the repository
- Find a person by id number
- Main entry point
multipledatabases Key Features
multipledatabases Examples and Code Snippets
Community Discussions
Trending Discussions on multipledatabases
QUESTION
In my spring boot(data) project, I am trying to set up and use multiple databases. One database is MySql and other database is H2. I defined custom JPA configurations as shown here. During application startup I get the exception
No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available exception occurs
I tried to follow the instructions from Baeldung blog.
Exception Log:
...ANSWER
Answered 2020-May-30 at 00:01Okay. This issue is caused by Redisson dependency that I use for cache. My primary database which is SQL server configured to use Redis as hibernate second level cache and second database(Oracle) is not. But for some reason second database also expecting Redisson
configuration and throwing NullPointerException
. Disabling cache on my second database fixed the issue
Note: The demo I added has MySql and H2 databases instead of SQL Server and Oracle databases
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install multipledatabases
You can use multipledatabases like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the multipledatabases component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page