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 Java class

You can create Java classes in your Roo project, either by using the IDE of your choice or by using the class command. If you create a class using Roo, boilerplate code (which includes toString , and get and setter methods for attributes) is generated automatically and managed by Spring Roo, and is kept in a separate AspectJ ITD file.

Getting ready

Start the Roo shell from the C:\roo-cookbook\ch01-recipe directory, which contains the flight-app Roo project.

How to do it...

You can create a Java class using the class command, as shown here:

roo> class --class sample.roo.flightapp.service.FlightService --rooAnnotations

Created SRC_MAIN_JAVA\sample\roo\flightapp\service
Created SRC_MAIN_JAVA\sample\roo\flightapp\service\FlightService.java ...

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