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.
Imho a project organized in Maven modules will give you more or less benefits depending on the application type: monolithic or microservices.
Maybe microservices based applications can be organized in the way said by Josh ... but organizing monolithic applications in Maven modules makes the maintenance, API distribution, etc. more comfortable.
Spring Roo 2.0.0.M2 generates multimodule Spring Boot applications. Download it from http://projects.spring.io/spring-roo/, install it and run
You will get a nice Spring Boot multimodule project.