3. Organize your project structure
When creating an enterprise application (or any other software), please keep in mind that a consistent project structure is easier to maintain. For typical Spring MVC project (with data layer and business layer) you need package structure like this.
This is package for storing entity class, POJO, or any other Java class.
This is package for storing Java class that acts as data supplier to the service. The data source can be originated from database or mockup (synthetic data).
This is package for storing Java class that perform business activity to the main application (doing business logic, data access to the repository, etc.).
This is package for storing the Spring MVC main controller (Java class that process HTTP request, mapping, etc.).