0
Hello, I have the following project structure using Spring Boot and I’m having problems es create their Beans:
project1: com.portal (spring-boot service)
contem os @Controllers
project2: with.service
contem os @Service e @Component
project3: with.model
contem os @Repository
The portal project does not talk to the model only with the service, which in turn talks to the model.
But when it comes to raising the service of the project1 with.portal, it gives an error saying that it cannot access a class of the project with.model, which I believe is correct because the portal does not have access to the classes of the model.
Is there any way around this in spring boot or am I doing the wrong project structure?
in my view the structure is "correct", but you should not return the model, but rather a
– Lucas Miranda
hi @Lucasmiranda is exactly what I do, always return a DTO, but even so spring is complaining, I realized that this occurred due to the deletion of a package, because I put the model as dependency service, and when I put the service as dependency of the portal I delete the package of the model, from there it starts to give error, if I shoot the exclusion works
– Everton