In this recipe we'll see how the database
properties
list
command lets us view the list of database properties and their values, as specified in the database.properties
file.
Refer to the Setting up a JPA provider for your project recipe to create a flight-app
Roo project and to set up a persistence provider using the persistence
setup
command.
Follow these steps to view database properties:
C:
oo-cookbookch02-recipes
directory.database.properties
file located in SRC_MAIN_RESOURCESMETA-INFspring
directory, you can use the database
properties
list
command, as shown here:roo> database properties list database.driverClassName = com.mysql.jdbc.Driver database.password = database.url = jdbc:mysql://localhost:3306/myFlightAppDB database.username =
The database
properties
list
command is processed by the JPA add-on
. Instead of using the database
properties
list
command you can use the properties
list
command (refer to the Viewing properties defined in a properties file recipe of Chapter 1), which shows the properties contained in a properties
file. The end result of using either of the commands is the same, the only difference being that you need to specify the name
and path
arguments in the properties
list
command to refer to the database.properties
file.
Instead of using Spring Roo, you can also view the database.properties
file using an IDE like Eclipse or STS. The whole idea of using Spring Roo's database
properties
list
command is to allow developers to look at the database properties without switching to the IDE.
3.139.105.159