I'd done a lot of Boot projects before. But never tried multi-module structure.
Here is the my sample structure
Parent project: com.github.o.parent
Just declares org.springframework.boot-spring-boot-autoconfigure
Common project: com.github.o.common
Holds entities, repositories and repository related service classes. Only have a configuration class for HikariCP data source. Question: Which annotations (especially JPA related) right for this configuration class?
Rest project: com.github.o.rest
Depends to JPA project. Needs to use common project service classes. Also have a Application class with SpringBootApplication. Question: Same, which annotations needed for scanning common project services and repositories.
I'd tried different annotations / configurations but i can't inject a repository from common project.
Thanks.
the second ting you're asking about is how to layer configuration for annotations. this should be less of an issue if you use the above approach.