O'Reilly logo

Spring Roo 1.1 Cookbook by Ashish Sarin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a Spring MVC controller for a specific JPA entity

The controller all command let's you create controllers for all JPA entities for which a corresponding controller doesn't exist. If you want to control the web request path to which the controller is mapped or the operations supported by the controller, then you should use the controller scaffold command.

Getting ready

Delete the contents of the ch04-recipe sub-directory inside the C:\roo-cookbook directory.

Copy the ch04_web-app.roo script into the ch04-recipe directory.

Execute the ch04_web-app.roo script that creates the flight-app Roo project, sets up Hibernate as the persistence provider, configures MySQL as the database for the application, creates Flight and the FlightDescription JPA ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required