通过这太问题建议的命令不存在的Grails 3.1.X Can I configure Grails with no datasource?如何在grails 3.x中删除hibernate?
grails uninstall-plugin hibernate
| Error Command not found uninstall-plugin
问题Grails的应用程序不需要坚持,我想减少内存占用。 寻找适用于grails 3.1.x或更新版本的答案。
通过这太问题建议的命令不存在的Grails 3.1.X Can I configure Grails with no datasource?如何在grails 3.x中删除hibernate?
grails uninstall-plugin hibernate
| Error Command not found uninstall-plugin
问题Grails的应用程序不需要坚持,我想减少内存占用。 寻找适用于grails 3.1.x或更新版本的答案。
要删除所有休眠,您只需从build.gradle
中删除任何休眠依赖关系,这是您不需要的。
如:删除这些(如3.2.8)
buildScript:
classpath "org.grails.plugins:hibernate5:${gormVersion-".RELEASE"}"
依赖关系:
compile "org.grails.plugins:hibernate5"
compile "org.hibernate:hibernate-core:$hibernateVersion"
compile "org.hibernate:hibernate-ehcache:$hibernateVersion"
您也可以使用CLI grails create-app --features ...
不包括休眠作为功能,只有你想要的功能。
从您的application.yml中删除依赖项。
另外,如果您不需要持久性,您是否使用Spark Java代替Grails?它超轻量级,您可以轻松使用Groovy。