Spring Roo - Reference Documentation


Ben Alex , Stefan Schmidt , Alan Stewart , James Tyrrell , Andrew Swan


Copyright 2009-2013 VMware, Inc. All Rights Reserved.

Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.

I. Welcome to Spring Roo
1. Introduction
1.1. What is Roo?
1.2. Why Use It
1.2.1. Higher Productivity
1.2.2. Stock-Standard Java
1.2.3. Usable and Learnable
1.2.4. No Engineering Trade-Offs
1.2.5. Easy Roo Removal
1.3. Installation
1.4. Optional ROO_OPTS Configuration
1.5. First Steps: Your Own Web App in Under 10 Minutes
1.6. Exploring the Roo Samples
1.7. Suggested Steps to Roo Productivity
2. Beginning With Roo: The Tutorial
2.1. What You'll Learn
2.2. Alternative Tutorial: The Wedding RSVP Application
2.3. Tutorial Application Details
2.4. Step 1: Starting a Typical Project
2.5. Step 2: Creating Entities and Fields
2.6. Step 3: Integration Tests
2.7. Step 4: Using Your IDE
2.8. Step 5: Creating A Web Tier
2.9. Step 6: Loading the Web Server
2.10. Securing the Application
2.11. Customizing the Look & Feel of the Web UI
2.12. Selenium Tests
2.13. Backups and Deployment
2.14. Where To Next
3. Application Architecture
3.1. Architectural Overview
3.2. Critical Technologies
3.2.1. AspectJ
3.2.2. Spring
3.3. Entity Layer
3.4. Web Layer
3.5. Optional Services Layer
3.6. Goodbye DAOs
3.7. Maven
3.7.1. Packaging
3.7.2. Multi-Module Support Features Limitations
4. Usage and Conventions
4.1. Usability Philosophy
4.2. Shell Features
4.3. IDE Usage
4.4. Build System Usage
4.5. File System Conventions
4.6. Add-On Installation and Removal
4.7. Recommended Practices
4.8. Managing Roo Add-Ons
5. Existing Building Blocks
5.1. Existing Projects
5.2. Existing Databases
6. Removing Roo
6.1. How Roo Avoids Lock-In
6.2. Pros and Cons of Removing Roo
6.3. Step-by-Step Removal Instructions
6.3.1. Step 1: Push-In Refactor
6.3.2. Step 2: Annotation Source Code Removal
6.3.3. Step 3: Annotation JAR Removal
6.4. Reenabling Roo After A Removal
II. Base Add-Ons
7. Base Add-On Overview
8. Persistence Add-On
8.1. JPA setup command
8.2. Entity JPA command
8.3. Field commands
9. Incremental Database Reverse Engineering (DBRE) Add-On
9.1. Introduction
9.1.1. What are the benefits of Roo's incremental reverse engineering?
9.1.2. How does DBRE work? Obtaining database metadata Class and field name creation
9.2. Installation
9.3. DBRE Add-On commands
9.4. The @RooDbManaged annotation
9.5. Supported JPA 2.0 features
9.5.1. Simple primary keys
9.5.2. Composite primary keys
9.5.3. Entity relationships Many-valued associations with many-to-many multiplicity Single-valued associations to other entities that have one-to-one multiplicity Many-valued associations with one-to-many multiplicity Single-valued associations to other entities that have many-to-one multiplicity Multiple associations in the same entity
9.5.4. Other fields
9.5.5. Existing fields
9.6. Troubleshooting
10. Application Layering
10.1. The Big Picture
10.2. Persistence Layers
10.2.1. JPA Entities (Active Record style)
10.2.2. JPA Repository
10.2.3. MongoDB Persistence Setup Entities Repository Example & Cloud Foundry Deployment
10.3. Service Layer
11. Web MVC Add-On
11.1. Controller commands
11.2. Application Conversion Service
11.3. JSP Views
12. JavaServer Faces (JSF) Add-On
12.1. JSF commands
12.2. The @RooJsfManagedBean annotation
12.3. The @RooJsfConverter annotation
12.4. The @RooJsfApplicationBean annotation
12.5. The bikeshop example
13. Cloud Foundry Add-On
13.1. Installing the Cloud Foundry Add-On
13.2. Getting Started
13.2.1. Logging In
13.2.2. The Commands
13.2.3. Deploying Your Application
13.2.4. Viewing Your Applications
13.2.5. Binding Services
13.2.6. Provisioning Memory
13.2.7. Starting Your Application
13.3. Conclusion
14. Google Web Toolkit Add-On
14.1. GWT Add-On Commands
14.2. Running and Compiling
14.3. Desktop and Mobile Views
14.4. ITDs: GWT Style
14.5. UiBinder ui.xml Files
14.6. Expected GWT Add-On Behaviour
14.7. Migrating a Roo GWT project (1.1 -> 1.1.1+)
14.8. Troubleshooting
15. JSON Add-On
15.1. Adding JSON Functionality to Domain Types
15.2. JSON REST Interface in Spring MVC controllers
16. Apache Solr Add-On
16.1. Solr Server Installation
16.2. Solr Add-On Commands
16.3. The @RooSolrSearchable Annotation
III. Internals and Add-On Development
17. Development Processes
17.1. Guidelines We Follow
17.2. Source Repository
17.3. Setting Up for Development
17.4. Submitting Patches
17.5. Path to Committer Status
18. Simple Add-Ons
18.1. Project Setup
18.2. Fast Creation
18.3. Shell Interaction
18.4. Operations
18.5. Packaging & Distribution
18.6. Publishing to RooBot
18.7. Upgrading Spring Roo Add-Ons from 1.0.x to 1.1.0
19. Advanced Add-Ons
19.1. Metadata
19.2. Annotations
19.3. Inter-Type Declarations
19.4. Recommendations
IV. External Add-Ons
20. Tailor Add-On
20.1. Introduction
20.2. How it works
20.3. Tailor Add-On Commands
20.4. Tailor Configuration
20.4.1. Actions execute defaultvalue focus
20.4.2. XML Configuration Example 1: Tailor the "project" command Example 2: Default target modules and default values Example 3: Alias command to create layers
20.4.3. Configuration Addon
V. Appendices
A. Command Index
A.1. Add On Commands
A.1.1. addon feedback bundle
A.1.2. addon info bundle
A.1.3. addon info id
A.1.4. addon install bundle
A.1.5. addon install id
A.1.6. addon list
A.1.7. addon remove
A.1.8. addon search
A.1.9. addon upgrade all
A.1.10. addon upgrade available
A.1.11. addon upgrade bundle
A.1.12. addon upgrade id
A.1.13. addon upgrade settings
A.2. Backup Commands
A.2.1. backup
A.3. Classpath Commands
A.3.1. class
A.3.2. constructor
A.3.3. enum constant
A.3.4. enum type
A.3.5. focus
A.3.6. interface
A.4. Controller Commands
A.4.1. controller all
A.4.2. controller scaffold
A.4.3. web mvc all
A.4.4. web mvc scaffold
A.5. Creator Commands
A.5.1. addon create advanced
A.5.2. addon create i18n
A.5.3. addon create simple
A.5.4. addon create wrapper
A.6. Data On Demand Commands
A.6.1. dod
A.7. Dbre Commands
A.7.1. database introspect
A.7.2. database reverse engineer
A.8. Embedded Commands
A.8.1. web mvc embed document
A.8.2. web mvc embed generic
A.8.3. web mvc embed map
A.8.4. web mvc embed photos
A.8.5. web mvc embed stream video
A.8.6. web mvc embed twitter
A.8.7. web mvc embed video
A.8.8. web mvc embed wave
A.9. Equals Commands
A.9.1. equals
A.10. Felix Delegator
A.10.1. exit
A.10.2. osgi find
A.10.3. osgi framework command
A.10.4. osgi headers
A.10.5. osgi install
A.10.6. osgi log
A.10.7. osgi obr deploy
A.10.8. osgi obr info
A.10.9. osgi obr list
A.10.10. osgi obr start
A.10.11. osgi obr url add
A.10.12. osgi obr url list
A.10.13. osgi obr url refresh
A.10.14. osgi obr url remove
A.10.15. osgi ps
A.10.16. osgi resolve
A.10.17. osgi scr config
A.10.18. osgi scr disable
A.10.19. osgi scr enable
A.10.20. osgi scr info
A.10.21. osgi scr list
A.10.22. osgi start
A.10.23. osgi uninstall
A.10.24. osgi update
A.10.25. osgi version
A.11. Field Commands
A.11.1. field boolean
A.11.2. field date
A.11.3. field embedded
A.11.4. field enum
A.11.5. field file
A.11.6. field list
A.11.7. field number
A.11.8. field other
A.11.9. field reference
A.11.10. field set
A.11.11. field string
A.12. Finder Commands
A.12.1. finder add
A.12.2. finder list
A.13. Gwt Commands
A.13.1. gwt setup
A.13.2. web gwt all
A.13.3. web gwt gae update
A.13.4. web gwt proxy all
A.13.5. web gwt proxy request all
A.13.6. web gwt proxy request type
A.13.7. web gwt proxy type
A.13.8. web gwt request all
A.13.9. web gwt request type
A.13.10. web gwt scaffold
A.13.11. web gwt setup
A.14. Hint Commands
A.14.1. hint
A.15. Integration Test Commands
A.15.1. test integration
A.15.2. test mock
A.15.3. test stub
A.16. J Line Shell Component
A.16.1. */
A.16.2. /*
A.16.3. //
A.16.4. date
A.16.5. flash test
A.16.6. script
A.16.7. system properties
A.16.8. version
A.17. Jms Commands
A.17.1. field jms template
A.17.2. jms listener class
A.17.3. jms setup
A.18. Jpa Commands
A.18.1. database properties list
A.18.2. database properties remove
A.18.3. database properties set
A.18.4. embeddable
A.18.5. entity jpa
A.18.6. jpa setup
A.18.7. persistence setup
A.19. Jsf Commands
A.19.1. web jsf all
A.19.2. web jsf media
A.19.3. web jsf scaffold
A.19.4. web jsf setup
A.20. Json Commands
A.20.1. json add
A.20.2. json all
A.21. Jsp Commands
A.21.1. controller class
A.21.2. web mvc controller
A.21.3. web mvc install language
A.21.4. web mvc install view
A.21.5. web mvc language
A.21.6. web mvc setup
A.21.7. web mvc update tags
A.21.8. web mvc view
A.22. Logging Commands
A.22.1. logging setup
A.23. Mail Commands
A.23.1. email sender setup
A.23.2. email template setup
A.23.3. field email template
A.24. Maven Commands
A.24.1. dependency add
A.24.2. dependency remove
A.24.3. maven repository add
A.24.4. maven repository remove
A.24.5. module create
A.24.6. module focus
A.24.7. perform assembly
A.24.8. perform clean
A.24.9. perform command
A.24.10. perform eclipse
A.24.11. perform package
A.24.12. perform tests
A.24.13. project
A.25. Metadata Commands
A.25.1. metadata cache
A.25.2. metadata for id
A.25.3. metadata for module
A.25.4. metadata for type
A.25.5. metadata status
A.25.6. metadata trace
A.26. Mongo Commands
A.26.1. entity mongo
A.26.2. mongo setup
A.26.3. repository mongo
A.27. Os Commands
A.27.1. !
A.28. Pgp Commands
A.28.1. pgp automatic trust
A.28.2. pgp key view
A.28.3. pgp list trusted keys
A.28.4. pgp refresh all
A.28.5. pgp status
A.28.6. pgp trust
A.28.7. pgp untrust
A.29. Process Manager Commands
A.29.1. development mode
A.29.2. poll now
A.29.3. poll speed
A.29.4. poll status
A.30. Process Manager Diagnostics Listener
A.30.1. process manager debug
A.31. Prop File Commands
A.31.1. properties list
A.31.2. properties remove
A.31.3. properties set
A.32. Proxy Configuration Commands
A.32.1. proxy configuration
A.33. Repository Jpa Commands
A.33.1. repository jpa
A.34. Security Commands
A.34.1. permissionEvaluator
A.34.2. security setup
A.35. Selenium Commands
A.35.1. selenium test
A.36. Service Commands
A.36.1. service all
A.36.2. service secure all
A.36.3. service secure type
A.36.4. service type
A.37. Simple Parser Component
A.37.1. help
A.37.2. reference guide
A.38. Solr Commands
A.38.1. solr add
A.38.2. solr all
A.38.3. solr setup
A.39. Tailor Commands
A.39.1. tailor activate
A.39.2. tailor deactivate
A.39.3. tailor list
A.40. Uaa Commands
A.40.1. download accept terms of use
A.40.2. download privacy level
A.40.3. download reject terms of use
A.40.4. download status
A.40.5. download view
A.41. Web Finder Commands
A.41.1. web mvc finder add
A.41.2. web mvc finder all
A.42. Web Flow Commands
A.42.1. web flow
A.43. Web Json Commands
A.43.1. web mvc json add
A.43.2. web mvc json all
A.43.3. web mvc json setup
B. Upgrade Notes and Known Issues
B.1. Known Issues
B.2. Version Numbering Approach
B.3. Upgrading To Any New Release
B.4. Upgrading to 1.2.0.RC1
B.5. Upgrading to 1.2.0.M1
B.6. Upgrading to 1.1.3.RELEASE
B.7. Upgrading to 1.1.2.RELEASE
B.8. Upgrading to 1.1.1.RELEASE
B.9. Upgrading to 1.1.0.RELEASE
B.10. Upgrading to 1.1.0.RC1
B.11. Upgrading to 1.1.0.M3
B.12. Upgrading to 1.1.0.M2
B.13. Upgrading to 1.1.0.M1
B.14. Upgrading to 1.0.2.RELEASE
B.15. Upgrading to 1.0.1.RELEASE
B.16. Upgrading to 1.0.0.RELEASE
B.17. Upgrading to 1.0.0.RC4
B.18. Upgrading to 1.0.0.RC3
C. Project Background
C.1. History
C.2. Mission Statement
D. Roo Resources
D.1. Project Home Page
D.2. Downloads and Maven Repositories
D.3. Community Forums
D.4. Twitter
D.5. Issue Tracking
D.6. Source Repository
D.7. Source Web Browsing
D.8. Commercial Products and Services
D.9. Other