2017-04-12 39 views

回答

1

要刪除所有休眠,您只需從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 ...不包括休眠作爲功能,只有你想要的功能。

0

從您的application.yml中刪除依賴項。

另外,如果您不需要持久性,您是否使用Spark Java代替Grails?它超輕量級,您可以輕鬆使用Groovy。