DEV Community

sanjay shivanna
sanjay shivanna

Posted on

Springboot Project Structure

In this short article we will try to explore some of the discussions around best practices for packages

Project by code structure

alt text

Above structure defined is more a classic structure followed mostly :) ... (At least on the projects that I worked on)

Project by feature structure

alt text

package by feature

Follow this article which more are less explains the spring pet clinic project structure.

package by code structure

Below is the good article I found about project by code structure, if you find anything better, please comment.

which ever approach you choose from above for enterprise you would like to standardize the project structure for all the development team and provide some template classes. If you are using maven you can do this by arch-type.

Maven Archtype

We can use maven archtype to create structure. Personally I feel it's important in enterprise to have a common structure defined for consistency and readability perspective.

Good Articles to follow for creating a maven archtype.

you can also use IntellIJ feature for storing project templates locally for future reference.

In this article I try to summarize the package structure and how we can use maven archtype to create our package structures and templates.

Top comments (0)