DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Tucker Pelletier
Tucker Pelletier

Posted on

Grails 3.3.10 to 4.0.2 Postmortem

The Grails 3 to 4 upgrade was nowhere near as daunting as upgrading from 2.5.x. However, I thought I would do a postmortem for the upgrade just the same. This is for a project that has about 80,000 lines of Groovy/Grails, and 40,000 lines of GSP, which is quickly becoming deprecated for Angular.

Tasks:

  • Custom password salt implementation finding temp workaround then replacing, with bcrypt.
  • Removing a duplicate class wonder why this didn't cause issues before
  • Removed a class that was just a script, which means it had a main method which caused errors
  • Fixed unit test the fall back for the mixins didn't seem to work anymore
  • Gorm/HQL had to replace all ? params with positional ?0,?1,..., etc.
  • Had to add enabled = true to war task
  • groovy.json.internal.LazyMap was being used with instanceof had to update to org.apache.groovy.json.internal.LazyMap
  • Many instances where hibernate proxies were not being unwrapped. Fixed with GrailsHibernateUtil.unwrapIfProxy or fetch:'join' depending on circumstances
  • DB migration plugin no longer has access to system properties so I had to add a fallback candidate to the config.
  • Actuators and h2 console changed so I had to update the security around them
  • Had to move where I defined the sourceSets for the resources for the db migrations
  • Had to exclude old converters from grails-datastore-rest-client, which we should upgrade
  • Had to fix spring security ldap: https://www.baeldung.com/spring-boot-security-autoconfiguration spring.autoconfigure.exclude=['org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration', 'org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration']

Other resources:

Top comments (0)

Hi!I'm Noah!

Hey, my name is Noah and I’m the one who set up this ad!


My job is to get you to join DEV, so if you fancy doing me a favor, I’d love for you to create an account.
Β 
If you found DEV from searching around, here are a couple of our most popular articles on DEV: