FAQ: Spring Roo 1.2

  1. Spring Roo Pluging/Addons

    gvNIX
    WEB Report – jasperoo

    There is an introduction on blog at: http://my.digitalface.ca/2011/03/jas…-jasperoo.html
    The project is hosted on Google Code at: jasperoo.digitalface.ca.

     
    roo> osgi start --url http://s.digitalface.ca/jasperoo-latest
    roo> jasperoo setup
    roo> jasperoo add --type ~.domain
    roo> jasperoo all
    Vaadin

     

  2. Your Own Web App in Under 10 Minutes

    mkdir hello
    cd hello
    roo
    roo> hint
    roo> project --topLevelPackage com.foo
    ---------------------
    roo> jpa setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
    roo> entity jpa --class ~.Timer --testAutomatically
    roo> field string --fieldName message --notNull
    OR
    roo> jpa setup --provider HIBERNATE --database MYSQL --databaseName commission_app --userName root
    roo> database reverse engineer --package ~.domain --schema commission_app
    ---------------------
    roo> hint web mvc
    roo> web mvc setup
    roo> web mvc all --package ~.web
    roo> web mvc finder all
    roo> selenium test --controller ~.web.TimerController
    roo> web gwt setup
    roo> web gwt all --proxyPackage com.foo.client.request --requestPackage com.foo.client.request
    roo> perform tests
    roo> quit

    “roo> jpa setup –provider HIBERNATE –database MYSQL –databaseName spring_roo –userName root –password psw“.

    “roo> database reverse engineer –schema –package –testAutomatically –enableViews –includeTables –excludeTables –includeNonPortableAttributes” This command creates JPA entities in your project representing the tables and columns in your database. roo> database reverse engineer –schema order –package ~.domain

    “roo> perform eclipse” create IDE-specific workspace configuration artifacts if you not using STS or m2eclipse. Once this command has completed you are ready to import your project into STS by clicking ‘File > Import > General > Existing Projects into Workspace’. If you’re using STS or have installed m2eclipse into an Eclipse-based IDE can skip the perform eclipse command entirely. In this case you simply need to select in STS/Eclipse the ‘File > Import > General > Maven Projects’ menu option.

    “roo> backup” Issuing this command will create you a
    backup of the current workspace with all sources, log files and the script log file (excluding the target
    directory)

    “roo> addon search” lists all add-ons

    “roo> script bikeshop.roo” Import roo script

    “roo> perform package” This command produces your war file which can then be easily copied into your production Web container.

    "mvn gwt:run" to play with the GWT client
    "mvn tomcat:run" to start the Tomcat MVC front-end
    "mvn jetty:run-exploded"
    "mvn eclipse:eclipse" and then use Eclipse's "General > Import Existing Project into Workspace" feature. Leave the Roo shell running and feel free to edit in Eclipse
    "mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.2 -Dpackaging=jar -Dfile=/path/to/file" maven command to install your driver into your local maven repository
  3. Useful links

    Documentation

    Developing a Spring Framework MVC application step-by-step
    http://www.springsource.org/download
    http://static.springsource.org/spring-roo/reference/html/beginning.html
    http://www.youtube.com/watch?v=IDDVi1tTPs0
    http://www.youtube.com/user/SpringSourceDev
    http://www.springsource.com/developer/sts
    http://blog.springsource.com/2009/05/27/roo-part-2/
    JSR-000303 Bean Validation
    iReport & JasperReport
    GWT
    Community Forums
    Java community site
    Spring Data

    Source code

    https://src.springframework.org/svn/spring-samples/
    https://github.com/SpringSource/spring-mvc-showcase

  4. org.hibernate.HibernateException: The database returned no natively generated identity value

    It should be an auto_increment column for the IDENTITY generator to work. Else, the database doesn’t return any generated ID.
    http://www.java2s.com/Questions_And_Answers/JPA/MySQL/HibernateException.htm

  5. Themes

    To achieve a higher level of customization you can change the default Tiles template (WEB-INF/layouts/default.jspx) and adjust the JSP pages (WEB-INF/views/*.jspx).
    theming support offered by Spring framework

 

This entry was posted in Java. Bookmark the permalink.