未找到 Roo 的“数据库”命令(对于 DBRE)

Posted

技术标签:

【中文标题】未找到 Roo 的“数据库”命令(对于 DBRE)【英文标题】:Roo's 'database' command not found (for DBRE) 【发布时间】:2018-11-02 11:59:56 【问题描述】:

首先,我是 Spring Roo 新手。

当我尝试使用 Roo 的“数据库”命令从我的数据库中对 bean 进行逆向工程时,Roo 找不到该命令:

roo> database
Command 'database' not found (for assistance press CTRL+SPACE or type "hint" then hit ENTER)
Searching 'database' on installed repositories
0 matches found with 'database' on installed repositories

我正在使用:

Spring Roo 2.0.0.RELEASE STS 3.9.4 Spring IDE Roo 支持 3.9.4.201804120850-RELEASE

我想我可能会错过 DBRE 插件。在查找有关该插件的详细信息时,我在 documentation for Spring Roo 2.0.0.M1 中找到了有关它的信息,但在 documentation for Spring Roo 2.0.0.RELEASE 中没有找到。

DBRE 插件是否从 Spring Roo 2.0.0.RELEASE 中排除?回到 2.0.0.M1 似乎不是正确的解决方案。

这里是我的附加组件列表:

roo> addon list
START LEVEL 99
   ID|State      |Level|Name
    0|Active     |    0|System Bundle (5.4.0)|5.4.0
    1|Active     |    1|antlr-java-parser (1.0.15)|1.0.15
    2|Active     |    1|Commons Codec (1.8.0)|1.8.0
    3|Active     |    1|Commons IO (2.4.0)|2.4.0
    4|Active     |    1|Commons Lang (3.1.0)|3.1.0
    5|Active     |    1|jansi (1.6.0)|1.6.0
    6|Active     |    1|jsoup (1.9.1)|1.9.1
    7|Active     |    1|Apache Aries Subsystem API (2.0.8)|2.0.8
    8|Active     |    1|Apache Aries Subsystem Core (2.0.8)|2.0.8
    9|Active     |    1|Apache Aries Util (1.1.1)|1.1.1
   10|Active     |    1|Apache Felix Bundle Repository (2.0.8)|2.0.8
   11|Active     |    1|Apache Felix Configuration Admin Service (1.8.8)|1.8.8
   12|Active     |    1|Apache Felix Coordinator Service (1.0.0)|1.0.0
   13|Active     |    1|Apache Felix EventAdmin (1.4.6)|1.4.6
   14|Active     |    1|Apache Felix Gogo Command (0.16.0)|0.16.0
   15|Active     |    1|Apache Felix Gogo Runtime (0.16.2)|0.16.2
   16|Active     |    1|Apache Felix Log Service (1.0.1)|1.0.1
   17|Active     |    1|Apache Felix Metatype Service (1.1.2)|1.1.2
   18|Active     |    1|Apache Felix Declarative Services (2.0.4)|2.0.4
   19|Active     |    1|Apache ServiceMix :: Bundles :: freemarker (2.3.23.1)|2.3.23.1
   20|Active     |    1|Region Digraph (1.1.0.v20120522-1841)|1.1.0.v20120522-1841
   21|Active     |    1|Spring Roo - Addon - Backup (2.0.0.RELEASE)|2.0.0.RELEASE
   22|Active     |    1|Spring Roo - Addon - Cache Support (2.0.0.RELEASE)|2.0.0.RELEASE
   23|Active     |    1|Spring Roo - Addon - Configurable (2.0.0.RELEASE)|2.0.0.RELEASE
   24|Active     |    1|Spring Roo - Annotations - Configurable (2.0.0.RELEASE)|2.0.0.RELEASE
   25|Active     |    1|Spring Roo - Addon - Creator (2.0.0.RELEASE)|2.0.0.RELEASE
   26|Active     |    1|Spring Roo - Addon - DTO (2.0.0.RELEASE)|2.0.0.RELEASE
   27|Active     |    1|Spring Roo - Annotations - DTO (2.0.0.RELEASE)|2.0.0.RELEASE
   28|Active     |    1|Spring Roo - Addon - Email (2.0.0.RELEASE)|2.0.0.RELEASE
   29|Active     |    1|Spring Roo - Addon - Field (2.0.0.RELEASE)|2.0.0.RELEASE
   30|Active     |    1|Spring Roo - Addon - JavaBean Method Manager (2.0.0.RELEASE)|2.0.0.RELEASE
   31|Active     |    1|Spring Roo - Annotations - JavaBean Method Manager (2.0.0.RELEASE)|2.0.0.RELEASE
   32|Active     |    1|Spring Roo - Addon - JMS (2.0.0.RELEASE)|2.0.0.RELEASE
   33|Active     |    1|Spring Roo - Addon - JPA (2.0.0.RELEASE)|2.0.0.RELEASE
   34|Active     |    1|Spring Roo - Annotations - JPA (2.0.0.RELEASE)|2.0.0.RELEASE
   35|Active     |    1|Spring Roo - Addon - JPA Repository Layer (2.0.0.RELEASE)|2.0.0.RELEASE
   36|Active     |    1|Spring Roo - Annotations - JPA Repository Layer (2.0.0.RELEASE)|2.0.0.RELEASE
   37|Active     |    1|Spring Roo - Addon - Service Layer (2.0.0.RELEASE)|2.0.0.RELEASE
   38|Active     |    1|Spring Roo - Annotations - Service Layer (2.0.0.RELEASE)|2.0.0.RELEASE
   39|Active     |    1|Spring Roo - Addon - OS Commands (2.0.0.RELEASE)|2.0.0.RELEASE
   40|Active     |    1|Spring Roo - Addon - Plural Details (2.0.0.RELEASE)|2.0.0.RELEASE
   41|Active     |    1|Spring Roo - Annotations - Plural Details (2.0.0.RELEASE)|2.0.0.RELEASE
   42|Active     |    1|Spring Roo - Addon - Property Files (2.0.0.RELEASE)|2.0.0.RELEASE
   43|Active     |    1|Spring Roo - Addon - Push-In Support (2.0.0.RELEASE)|2.0.0.RELEASE
   44|Active     |    1|Spring Roo - Addon - Spring Security (2.0.0.RELEASE)|2.0.0.RELEASE
   45|Active     |    1|Spring Roo - Annotations - Spring Security (2.0.0.RELEASE)|2.0.0.RELEASE
   46|Active     |    1|Spring Roo - Automated Testing (2.0.0.RELEASE)|2.0.0.RELEASE
   47|Active     |    1|Spring Roo - Addon - Web MVC Controller (2.0.0.RELEASE)|2.0.0.RELEASE
   48|Active     |    1|Spring Roo - Annotations - Web MVC Controller (2.0.0.RELEASE)|2.0.0.RELEASE
   49|Active     |    1|Spring Roo - Addon - Exceptions (2.0.0.RELEASE)|2.0.0.RELEASE
   50|Active     |    1|Spring Roo - Annotations - Exceptions (2.0.0.RELEASE)|2.0.0.RELEASE
   51|Active     |    1|Spring Roo - Addon - I18n (2.0.0.RELEASE)|2.0.0.RELEASE
   52|Active     |    1|Spring Roo - Addon - Thymeleaf (2.0.0.RELEASE)|2.0.0.RELEASE
   53|Active     |    1|Spring Roo - Annotations - Thymeleaf (2.0.0.RELEASE)|2.0.0.RELEASE
   54|Active     |    1|Spring Roo - Addon - Web MVC Views (2.0.0.RELEASE)|2.0.0.RELEASE
   55|Active     |    1|Spring Roo - Addon - Spring Web Flow (2.0.0.RELEASE)|2.0.0.RELEASE
   56|Active     |    1|Spring Roo - Addon - Web Services (2.0.0.RELEASE)|2.0.0.RELEASE
   57|Active     |    1|Spring Roo - Annotations - Web Services (2.0.0.RELEASE)|2.0.0.RELEASE
   58|Active     |    1|Spring Roo - Runtime - Application Config (2.0.0.RELEASE)|2.0.0.RELEASE
   59|Active     |    1|Spring Roo - Runtime - Classpath (2.0.0.RELEASE)|2.0.0.RELEASE
   60|Active     |    1|Spring Roo - Runtime - Classpath (Antlr Java Parser) (2.0.0.RELEASE)|2.0.0.RELEASE
   61|Active     |    1|Spring Roo - Runtime - Converters (2.0.0.RELEASE)|2.0.0.RELEASE
   62|Active     |    1|Spring Roo - Runtime - Felix Interoperability (2.0.0.RELEASE)|2.0.0.RELEASE
   63|Active     |    1|Spring Roo - Runtime - File Monitor (2.0.0.RELEASE)|2.0.0.RELEASE
   64|Active     |    1|Spring Roo - Runtime - File Undo (2.0.0.RELEASE)|2.0.0.RELEASE
   65|Active     |    1|Spring Roo - Runtime - Metadata (2.0.0.RELEASE)|2.0.0.RELEASE
   66|Active     |    1|Spring Roo - Runtime - Model (2.0.0.RELEASE)|2.0.0.RELEASE
   67|Active     |    1|Spring Roo - Runtime - OBR Management (2.0.0.RELEASE)|2.0.0.RELEASE
   68|Active     |    1|Spring Roo - Runtime - ROO Gogo Commands (2.0.0.RELEASE)|2.0.0.RELEASE
   69|Active     |    1|Spring Roo - Runtime - Process Manager (2.0.0.RELEASE)|2.0.0.RELEASE
   70|Active     |    1|Spring Roo - Runtime - Project (2.0.0.RELEASE)|2.0.0.RELEASE
   71|Active     |    1|Spring Roo - Runtime - Property Files Manager (2.0.0.RELEASE)|2.0.0.RELEASE
   72|Active     |    1|Spring Roo - Runtime - Settings (2.0.0.RELEASE)|2.0.0.RELEASE
   73|Active     |    1|Spring Roo - Runtime - Shell (2.0.0.RELEASE)|2.0.0.RELEASE
   74|Active     |    1|Spring Roo - Runtime - Shell (OSGi Launcher) (2.0.0.RELEASE)|2.0.0.RELEASE
   75|Active     |    1|Spring Roo - Runtime - OSGi Start Level Control (2.0.0.RELEASE)|2.0.0.RELEASE
   76|Active     |    1|Spring Roo - Runtime - Roo Addon Suite Support (2.0.0.RELEASE)|2.0.0.RELEASE
   77|Active     |    1|Spring Roo - Runtime - Support for OSGi Features (2.0.0.RELEASE)|2.0.0.RELEASE
   78|Active     |    1|Spring Roo - Runtime - URL Stream API Contract (2.0.0.RELEASE)|2.0.0.RELEASE
   79|Active     |    1|Spring Roo - Wrapping - antlr4-runtime (4.3.2)|4.3.2
   80|Active     |    1|Spring Roo - Wrapping - bcpg-jdk15 (1.45.10)|1.45.10
   81|Active     |    1|Spring Roo - Wrapping - bcprov-jdk15 (1.45.10)|1.45.10
   82|Active     |    1|Spring Roo - Wrapping - inflector (0.7.0.010)|0.7.0.010
   83|Active     |    1|Spring Roo - Wrapping - jline (1.0.0.S2-B_0013)|1.0.0.S2-B_0013
   84|Active     |    1|Spring Roo - Wrapping - json-simple (1.1.10)|1.1.10
   85|Active     |    1|Spring Roo - Wrapping - jsoup (1.9.1.001)|1.9.1.001
   86|Active     |    1|Spring Roo - Wrapping - snakeyaml (1.15.1)|1.15.1
   87|Active     |    1|slf4j-api (1.7.12)|1.7.12
   88|Resolved   |    1|slf4j-jdk14 (1.7.12)|1.7.12
   89|Active     |    1|Spring Roo - Shell (Eclipse Implementation) (2.0.0.BUILD-SNAPSHOT)|2.0.0.BUILD-SNAPSHOT
   90|Active     |    1|org.osgi.service.subsystem.region.context.0 (1.0.0)|1.0.0
   91|Active     |    1|Spring Roo - Wrapping - mysql-connector-java (5.1.18.0002)|5.1.18.0002

感谢您的帮助。

【问题讨论】:

【参考方案1】:

是的,抱歉,Spring Roo 2.0 不包含 DBRE 插件。

此功能需要从头开始重新创建,并且无法在 2.0.0 RELEASE 中包含它

祝你好运。

【讨论】:

感谢您的回复,@jmvivo。 DBRE 插件可以为我节省大量时间。你建议我怎么做?我想我可以手动包含这个附加组件吗?这个具体的命令是什么样的?谢谢。 对不起,它不包括在内,因为它没有迁移到 2.0 版本(正如我在回答中已经说过的,没有办法轻易做到这一点)。如果您需要 DBRE Roo 2.0 不是您的工具。

以上是关于未找到 Roo 的“数据库”命令(对于 DBRE)的主要内容,如果未能解决你的问题,请参考以下文章

C# Mysql EF6 Code First System.ComponentModel.Win32Exception 文件未找到

lsnrctl start 命令未找到 数据库连接报错“ORA-12541: TNS: 无监听程序”

未找到数据库异常基表或视图

XLSX 文件未找到 Rails,文件格式不正确

Spring Roo 2.0.0.RC1 安全配置-添加用户和角色

如何在 spring roo 项目中安装 JPA 持久性提供程序?