通過這太問題建議的命令不存在的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。