Sunday, September 7, 2014

SPRING ROO

---------------------
   HINT & HELP
---------------------
- use TAB or CTRL + SPACE regularly for discovering
  mandatory and optional attributes, and their pre-defined values
- help  (ex: help project)
- hint topics (all avilable topics)
- Running Roo script file (ex: roo.bat script --file bikeshop.roo)
- Spring Roo Beginning
- Spring Roo Command Index
---------------------
     PROJECT
---------------------
- project --topLevelPackage sample.roo.flightapp --java 6 --projectName flight-app
---------------------
  PERSISTENCE
---------------------
*************
  ROO DBRE
*************

- osgi start --url file:/C:/driver/mysql-connector-java-5.1.18-bin.jar
- osgi ps
- persistence setup --provider HIBERNATE --database MYSQL --jndiDataSource

- persistence setup --provider HIBERNATE --database MYSQL --databaseName test --userName root --password 123 --hostName localhost
- database introspect --schema test  --file --enableViews
- database introspect --schema test.student  --file --enableViews
- database introspect --schema no-schema-required
- database reverse engineer --schema test --excludeTables jbpm4_*
  --package ~.domain

*************
    JPA 
*************
 
- jpa setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
- jpa setup --provider HIBERNATE --database MYSQL --databaseName test --userName root --password 123 --hostName localhost
- hint 
- entity jpa --class ~.Timer --testAutomatically
- field string code --notNull --sizeMin 1 --sizeMax 30
- field string email --sizeMax 30
- field number attending --type java.lang.Integer
- field string specialRequests --sizeMax 100
- field date confirmed --type java.util.Date
---------------------
      PERFORM
---------------------
- perform package
- perform eclipse
- perform command --mavenCommand eclipse:eclipse (execute maven goal)
---------------------
      LOGGING
---------------------
- logging setup --level DEBUG --package ROOT
---------------------
---------------------
     SECURITY
---------------------
- security setup
---------------------
---------------------
     E-MAIL
---------------------
- email sender setup --hostServer 127.0.0.1
- field email template --class ~.web.PublicRsvpController
---------------------
     PROPERTIES
---------------------
- modify properties
- properties list --name log4j.properties --path SRC_MAIN_RESOURCES
- database properties list
- database properties set --key database.url --value jdbc:hsqldb:${user.home}/my-wedding
- database properties list
---------------------
         MVC
---------------------
- hint web mvc
- web mvc setup / - web flow
- web mvc scaffold ~.web.TimerController
- web mvc all --package ~.web
- finder list --class ~.domain.Rsvp --filter code,equ
- finder add --finderName findRsvpsByCodeEquals
---------------------
      TOMCAT
---------------------
- mvn clean install tomcat7:run
- mvn tomcat7:run
- perform command --mavenCommand tomcat:run
---------------------
- exit
- quit
----------------------------------
SEQUENCE in ROO SHELL
----------------------------------
project --topLevelPackage com.jini.classicmodels
persistence setup --provider HIBERNATE --database MYSQL --databaseName classicmodels --userName root --password 111
database reverse engineer --schema classicmodels --package ~.domain
web mvc setup
web mvc all --package ~.web
perform package
perform eclipse
quit
mvn clean install tomcat7:run
mvn tomcat7:run

No comments:

Post a Comment