我认为您缺少创建项目或 jpa 设置步骤之一。首先,您必须创建一个项目,然后在编辑生成的 datapase.properties 并进行数据库自省之后进行 jpa 设置。提示命令将始终指导您进行下一步。
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