0

我想对一个 sql-server 数据库进行逆向工程。我已经建立了一个项目,创建了一个实体,控制器并设置了 web mvc。

在此之后,我使用 tomcat 启动应用程序。调用 Web 界面并添加记录。一切正常。

回到 roo shell (sts-plugin) 我尝试了这个database introspect --schema dbo命令,但我得到了这个微小的反馈:javax.net.ssl.TrustManager not found by [85]

另一个帖子中的用户提到您应该使用 osgi 启动 sqljdbc jar,如下所示:osgi start --url file:///C:/Users/e.zienecker/Downloads/mssql/sqljdbc4-4.0.jar

但是有了这个,我收到了以下消息:javax/net/ssl/TrustManager

有关更多信息,请参阅我的 spring roo 日志:

// Spring Roo 1.3.2.RELEASE [rev 8387857] log opened at 2016-05-31 10:00:38
project --topLevelPackage de.test --projectName DatabaseSample --java 6 --packaging JAR
// Spring Roo 1.3.2.RELEASE [rev 8387857] log closed at 2016-05-31 10:00:39
// Spring Roo 1.3.2.RELEASE [rev 8387857] log opened at 2016-05-31 10:00:40
jpa setup --provider HIBERNATE --database MSSQL
entity jpa --class ~.Person --testAutomatically
field string --fieldName firstName --notNull
field string --fieldName lastName --notNull
field number --fieldName age --type int
field boolean --fieldName driverLicense
web mvc setup
web mvc all --package ~.web
selenium test --controller ~.web.PersonController
perform tests
perform tests
perform package
// [failed] database introspect --schema dbo
osgi start --url  file:///C:/Users/mad/Downloads/mssql/sqljdbc4-4.0.jar
// [failed] database introspect --schema dbo
4

1 回答 1

0

您是否配置了所选数据库的用户名、密码和主机名?

您可以再次执行jpa setup命令并提供必要的参数,如--userName,--password等...

spring roo 1.3.2.RELEASE 文档的以下部分讨论了它:

http://docs.spring.io/spring-roo/docs/1.3.2.RELEASE/reference/html/command-index.html#command-index-jpa-setup

http://docs.spring.io/spring-roo/docs/1.3.2.RELEASE/reference/html/base-persistence.html#d4e1506

此外,您可以使用database properties set命令配置它们。

希望这可以帮助。

问候,

于 2016-06-01T10:09:36.500 回答