gpt4 book ai didi

grails - Grails数据库反向工程师插件错误

转载 作者:行者123 更新时间:2023-12-02 15:54:09 25 4
gpt4 key购买 nike

环境

Grails 2.4.4
PostgreSQL 9.4
JDK 1.7

这是我的 original question

因此,我这样更改了 /myApp/target/work/plugins/db-reverse-engineer-4.0.0/scripts/DbReverseEngineer.groovy
mergedConfig.driverClassName = dsConfig.driverClassName ?: 'org.postgresql.Driver'
mergedConfig.password = dsConfig.password ?: ''
mergedConfig.username = dsConfig.username ?: 'postgres'
mergedConfig.url = dsConfig.url ?: "jdbc:postgresql://localhost:5432/myDB"

我根据Burt和Emmanuel的建议更改了插件和依赖项。当我运行 grails db-reverse-engineer command时,出现此错误。
Compilation error: startup failed:
Compile error during compilation with javac.
/home/Documents/Grails_Workspace/myApp/target/work/plugins/cache-1.1.8/src/java/grails/plugin/cache/web/GenericResponseWrapper.java:203: error: method does not override or implement a method from a supertype
@Override
^
/home/Documents/Grails_Workspace/myApp/target/work/plugins/cache-1.1.8/src/java/grails/plugin/cache/web/filter/PageFragmentCachingFilter.java:389: error: cannot find symbol
contentType = response.getContentType();
^
symbol: method getContentType()
location: variable response of type HttpServletResponse
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

谁能向我解释这些错误的含义以及如何解决?
我尝试使用 Grails 3.0.12并遵循Grails 3的 DB reverse engineer教程,但是我比以往任何时候都迷路了。

提前致谢。

编辑
/Grails_Workspace/dbTest/target/work/plugins/db-reverse-engineer-4.0.0/src/groovy/grails/plugin/reveng/Reenigne.groovy: 92: Access to org.hibernate.cfg.Environment#DRIVER is forbidden @ line 92, column 14.
properties[Environment.DRIVER] = driverClass
. ^
.
Access to org.hibernate.cfg.Environment#PASS is forbidden @ line 93, column 14.
properties[Environment.PASS] = password
. ^
.
Access to org.hibernate.cfg.Environment#URL is forbidden @ line 94, column 14.
properties[Environment.URL] = url
. ^
.
Access to org.hibernate.cfg.Environment#USER is forbidden @ line 95, column 14.
properties[Environment.USER] = username
. ^
.
Access to org.hibernate.cfg.Environment#DIALECT is forbidden @ line 97, column 15.
properties[Environment.DIALECT] = dialect
. ^
.
Access to org.hibernate.cfg.Environment#DEFAULT_SCHEMA is forbidden @ line 100, column 15.
properties[Environment.DEFAULT_SCHEMA] = defaultSchema
. ^
.
Access to org.hibernate.cfg.Environment#DEFAULT_CATALOG is forbidden @ line 103, column 15.
properties[Environment.DEFAULT_CATALOG] = defaultCatalog
^

最佳答案

该错误来自cache插件,而不是反向工程插件。如果您不使用它,请从BuildConfig.groovy中删除它

关于grails - Grails数据库反向工程师插件错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35157504/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com