CRUD with Spring MVC & Hibernate

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.

Snap 2013-12-31 at 13.23.54

Description

  • org.munif.domain
    This is package for storing entity class, POJO, or any other Java class.
  • org.munif.repository
    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).
  • org.munif.service
    This is package for storing Java class that perform business activity to the main application (doing business logic, data access to the repository, etc.).
  • org.munif.bookstore
    This is package for storing the Spring MVC main controller (Java class that process HTTP request, mapping, etc.).
Advertisements

3 thoughts on “CRUD with Spring MVC & Hibernate

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s