简体   繁体   中英

Upgrading a Grails app from 1.3.7 to Java 8 compatibility version

I am looking to upgrade Grails from 1.3.7. Which version of grails is compatible with Java8? What versions of hibernate and tomcat plugins to be used?

Which version of grails is compatible with Java8?

Grails 2.5.x is the first version of Grails for which we officially support Java 8.

What versions of hibernate and tomcat plugins to be used?

Your options there will depend on which version of Grails you decide to use. If you are using Grails 2.5.6 then I would suggest :tomcat:7.0.70 and either :hibernate4:4.3.10 or :hibernate:3.6.10.18 . With Grails 3 you have a wider array of options.

Which version of grails is compatible with Java8?

I upgraded to 2.3.10 with JDK 1.8 successfully in two steps.

  • I first tried to upgrade it to version 2.0.5 from 1.3.7. (Note earlier vesions of grails support upgrade command which helps to upgrade few things automatically).

    Remember there will be some changes in Application

    1. AppplicationContext.xml will have some changes.

    2. The class org.codehaus.groovy.grails.commons.ConfigurationHolder is deprecated. Use below code

       def config = Holders.config 
  • In second step I migrated from version 2.0.5 to 2.3.10

What versions of hibernate and tomcat plugins to be used?

 runtime ':hibernate:3.6.10.16' // ':hibernate4:4.3.5.4' for Hibernate 4
 build ':tomcat:7.0.54'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM