RomanianCoderExamples | Angular examples for the Romanian Coder YouTube channel | Security library
kandi X-RAY | RomanianCoderExamples Summary
kandi X-RAY | RomanianCoderExamples Summary
Java / SpringBoot / Angular examples for the Romanian Coder YouTube channel
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of RomanianCoderExamples
RomanianCoderExamples Key Features
RomanianCoderExamples Examples and Code Snippets
Community Discussions
Trending Discussions on RomanianCoderExamples
QUESTION
I'm trying to get a clean springboot maven multimodule project. I'm using springboot 2.0.1.RELEASE
What I want to achieve is similar to this: SpringBootMultipleMavenModules
The problem I have is that I want to be able to inject my dependencies in any modules.
For example in this class: DBSeeder.java looks as follow:
...ANSWER
Answered 2018-Apr-26 at 14:59Looking at your code, you cannot Autowire
a Hotel
bean, because it's not registered properly.
You need to add @Component
there to be able to inject it in https://github.com/IDCS1426/SpringBootMultipleMavenModules/blob/master/persistence/src/main/java/rc/persistence/DbSeeder.java#L21
Also, the project will never compile, as you're adding a non-existing module: https://github.com/IDCS1426/SpringBootMultipleMavenModules/blob/master/pom.xml#L14. You need to remove that :).
Having said all of that, it's very weird to me the way you're trying to inject an Entity
like that, but that's not part of this question.
By doing that, the code compiles just fine.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install RomanianCoderExamples
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