Skip to content
Model centric tools for Spring development Community portal
Skyway PerspectivesModel driven delivery

Model reference

Reference Figure: The Application Model in the Tutorial

The tutorial application model is small on purpose: one entity, one service, one controller and two views. This figure shows how the parts connect.

Four step scaffolding wizard for creating a Spring application
Figure 102. The tutorial model is created in four guided steps.

The tutorial builds a small customer application. The model has one entity, one repository, one service, one controller and two views. Nothing is decorative. Every element exists to show one part of the generation flow.

The model at a glance

  • Customer entity. A name, an email and a status.
  • Customer repository. Find by key, find all and find by email.
  • Customer service. Save, find and list operations with a transaction boundary.
  • Customer controller. List and edit actions with a form backing object.
  • Views. A list page and a form page.

Following the tutorial

Create the project, add the entity, then generate. Read the generated files before you change them. The names in the generated code should match the names you used in the model. If they do not, the model and the recipe disagree, and it is easier to fix the model than the code.

Do it twice. Run the tutorial once as written, then delete the generated output and run it again from the same model. The second run should produce the same result. That repeatability is the point of the exercise.

When the tutorial is complete, extend the model with one new attribute and regenerate. The change should appear in the entity, the form, the list and the database script without any manual editing.