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

Step Guide

Step Guide: Generating and Running the Application

With a model in place, the next move is to generate the Spring project and start it. This step covers the generation run, the output layout and the first launch on a local server.

Four step scaffolding wizard for creating a Spring application
Figure 4.3. The generation wizard collects project, data source, entity and output choices before it writes code.

Generation is driven by recipes. A recipe describes the files to create, the templates to apply and the model inputs it needs. The default recipe set covers the common Spring layers: entities, repositories, services, controllers, views and configuration. You can run the whole set at once or select individual recipes.

Running generation

  1. Select the project in the model explorer and choose Generate.
  2. Pick an output folder. Use a folder that is empty or that already belongs to the same generated project.
  3. Select the recipe set. The default set writes a complete Spring MVC application.
  4. Review the summary of files that will be created or replaced, then confirm.

The run writes a report at the end. The report lists every file that was created, every file that was skipped and any model element that could not be generated. Read the skipped items first. They usually point to a missing attribute, an empty operation or a type that has no stereotype.

The generated layout

  • Source. Java types for entities, repositories, services and controllers.
  • Resources. Spring configuration, property files and database scripts.
  • Web. JSP pages, tag usage and static assets.
  • Tests. Starter tests for the generated service and controller layers.

First launch

Open the generated project in your IDE, confirm that the server runtime is configured, and deploy the project. If the application uses an embedded database, the first launch creates the schema from the generated scripts. Watch the console for the Spring context startup message, then open the application URL shown in the server view.

Regeneration safety. Generated files carry a marker in the header. Files without the marker are treated as hand written and are not overwritten. Keep custom logic in separate classes or in an override folder so that the next generation run leaves it alone.

Once the application starts, use the running application as a feedback loop. Change the model, regenerate, redeploy and compare. This short cycle is the main advantage of a model centric workflow.