How to use Spring Roo DBRE add-on in Roo 1.1.0 RELEASE?

I heard about the Roo DBRE add-on, and I think this is a great feature provided by Roo. However, I could not find the Google documentation on the Roo DBRE. How to use this feature? I also checked this JIRA ticket https://jira.springframework.org/browse/ROO-1685 and he said the documentation was created so where can I find it?

Also when I print database introspect --schema public --file schema.xml

Roo tells me The command database introspect --schema public --file schema.xml 'was found but is currently unavailable (type "help" then ENTER to find out about this command)

What does it mean? Do I need to manually install the add-in?

+3
source share
2 answers

I think you are missing one of the steps of creating a project or jpa. First you need to create a project, and then create jpa after this edit generated by datapase.properties and do an introspection of the database. The hint team will always lead you to the next step.

roo> project com.***.*****
Created ROOT/pom.xml
Created SRC_MAIN_RESOURCES
Created SRC_MAIN_RESOURCES/log4j.properties
Created SPRING_CONFIG_ROOT
Created SPRING_CONFIG_ROOT/applicationContext.xml 
roo> hint
Roo requires the installation of a persistence configuration,
for example, JPA.

For JPA, type 'jpa setup' and then hit TAB three times.
We suggest you type 'H' then TAB to complete "HIBERNATE".
After the --provider, press TAB twice for database choices.
For testing purposes, type (or TAB) HYPERSONIC_IN_MEMORY.
If you press TAB again, you'll see there are no more options.
As such, you're ready to press ENTER to execute the command.

Once JPA is installed, type 'hint' and ENTER for the next suggestion.

roo> jpa setup --provider HIBERNATE --database MSSQL 
+2
source

docs are at http://static.springsource.org/spring-roo/reference/html/base-dbre.html .

First you need to do a “persistence setting” so that Roo knows which database database to which. After that, you configure the connection in the META-INF / spring / datapase.properties file (generated by the "configure persistence" command.)

Oracle, , Springsource OSGi Oracle.

+1

Source: https://habr.com/ru/post/1775087/


All Articles