【问题标题】:How do I use Spring Roo DBRE add-on in Roo 1.1.0 RELEASE?如何在 Roo 1.1.0 RELEASE 中使用 Spring Roo DBRE 插件?
【发布时间】:2010-11-16 01:12:18
【问题描述】:

我听说过 Roo DBRE 插件,我认为这是 Roo 提供的一个很棒的功能。但是我在 Google 上找不到任何关于 Roo DBRE 的文档。如何使用此功能? 我也检查了这张 JIRA 票 https://jira.springframework.org/browse/ROO-1685 它说文档已创建,我在哪里可以找到它?

当我打字的时候 数据库自省 --schema public --file schema.xml

鲁告诉我 已找到命令“database introspect --schema public --file schema.xml”,但当前不可用(输入“help”,然后按 ENTER 了解此命令)

这是什么意思?我需要手动安装插件吗?

【问题讨论】:

    标签: spring-roo


    【解决方案1】:

    我认为您缺少创建项目或 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 
    

    【讨论】:

      【解决方案2】:

      文档位于http://static.springsource.org/spring-roo/reference/html/base-dbre.html。

      您必须首先进行“持久性设置”,以便 Roo 知道要定位哪个数据库。之后,在 META-INF/spring/datapase.properties 文件中配置连接(由“persistence setup”命令生成。)

      如果您尝试对 Oracle 数据库进行逆向工程,那么您将面临另一大难题,因为 Springsource 目前无法托管 OSGi 封装的 Oracle 驱动程序。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-06-22
        • 2012-03-22
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多