Java Spring Roo: Difference between revisions
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
# Assuming Roo is installed | # Assuming Roo is installed | ||
# Validate with the roo addon manager if Mysql is already install org.springframework.roo.wrapping.mysql | # Validate with the roo addon manager if Mysql is already install org.springframework.roo.wrapping.mysql | ||
# Youmay have to copy mysq.coonector.jar directly into the folder bundle in the roo installation directory | |||
# Create project | # Create project | ||
<pre>project --topLevelPackage com.objclt.roo.sample</pre> | <pre>project --topLevelPackage com.objclt.roo.sample</pre> |
Revision as of 17:06, 1 December 2014
Create application from Database
- Assuming Roo is installed
- Validate with the roo addon manager if Mysql is already install org.springframework.roo.wrapping.mysql
- Youmay have to copy mysq.coonector.jar directly into the folder bundle in the roo installation directory
- Create project
project --topLevelPackage com.objclt.roo.sample
- Create Database Connection
persistence setup --provider HIBERNATE --database MYSQL --databaseName databaseName --hostName hostname --userName username --password password
- Update database.properties
jdbc.driverClassName=com.mysql.jdbc.Driver jdbc.url=jdbc\:mysql\://localhost\:3306/Database_Name jdbc.usernameDatabase_User jdbc.password=User_Password
- Replace create by validate inside persistence.xml to disable the auto database creation
"Before" property name="hibernate.hbm2ddl.auto" value="create" "After" property name="hibernate.hbm2ddl.auto" value="validate"
- Install Mysql Driver
addon search mysql
addon install id 01
- Test Database Connection
database introspect --schema DatabaseSchema