img
What Spring Roo did was add the required Maven dependencies and configure the
ApplicationContext with the required components, the database connection information (in the
database.properties file), and the JPA persistence.xml file.
The next step is to create the Contact entity class. Enter the following command to create the class:
entity jpa --class ~.domain.Contact
The command indicates that we want to create a JPA entity class, with the package name
com.apress.prospring3.ch20 (the ~ character indicates the base package we defined when creating the
project), the subpackage name domain, and the class name Contact.
Then, Roo will generate the entity class, together with a number of AspectJ classes. Note that at the
time of writing, the Roo Shell has a minor problem: it doesn't add the path /src/main/java to the source
folder of the project, so we need to manually add it. To do this, in STS, right-click the project and select
Properties Java Build Path; then click the Add Folder button and check the /src/main/java folder, as
shown in Figure 20-13.
Figure 20-13. Configuring the Java build path for the Spring Roo project
Now when you look at the Package Explorer, you will see only the Contact class, not other AspectJ
classes generated by Roo. The reason is that by default the Package Explorer view will filter out those
classes from the view. To see it, in the Package Explorer view, click the View menu (the triangle symbol),
and select Filters, as shown in Figure 20-14.
Search WWH :
Custom Search
Previous Page
Spring Framework 3 Topic Index
Next Page
Spring Framework 3 Bookmarks
Home