Skip to content

Instantly share code, notes, and snippets.

@erichelgeson
Last active September 21, 2019 16:59
Show Gist options
  • Save erichelgeson/b069a534583e1ecd9427e7faa83ff712 to your computer and use it in GitHub Desktop.
Save erichelgeson/b069a534583e1ecd9427e7faa83ff712 to your computer and use it in GitHub Desktop.

Status

Ported non-trivial app - builds and runs on Grails 4 (master, no release yet) JDK 11.0.1. Startup is about 15 seconds. (2x faster than Grails 3.3.9)

IDE Support all works in Grails 4 (same as 3.3.9)

Updates

Plugins

Working

  • Spring-Security-Core 4.0.0-BUILD_SNAPSHOT

  • Spring-session-redis (boot starter)

    • Updated dependancies
compile "org.springframework.boot:spring-boot-starter-data-redis"
compile "org.springframework.session:spring-session-data-redis"

Mostly working

  • Spring-Websocket
    • Seems to work, but cant import class into app
  • Sentry
    • Seems loggers/reporters work

Not working

  • Gson Views 2.0.0.BUILD-SNAPSHOT
    • Unable to render json with simple objects (just get null response)
    • Domain classes dont render:
    Model variable [someDomain] of with value [Description] type [com.x.SomeDomain] is not of the correct type [com.x.SomeDomain]. Stacktrace follows:
    
  • Grails-Quartz
    • Seems boot is pulling in a much newer version of quartz
  • External Config
  • Grails Mail
    • Can't find/create bean
  • Asset Pipeline Handlebars issue:
    • Needed to update to change //= require handlebars/handlebars.js to //= require handlebars-runtime
    2019-01-13 16:59:42.280  WARN --- [nio-8080-exec-1] asset.pipeline.DirectiveProcessor        : Unable to Locate Asset: /handlebars/handlebars.js
    Warning: Nashorn engine is planned to be removed from a future JDK release
    

Notes

  • Build from source

    • No releaese yet, so clone grails-core and run:
      cd grails-core
      ./gradlew install -x groovydoc
      sdk install grails 4.0.0-SNAPSHOT `pwd`
      cd ..
      grails create-app four
      
  • No more hot reload (spring-loaded)

    • Fast reload takes about 5-6 seconds (hopefully can improve)
    • GSP's currently trigger an app context reload - probably shouldn't?
    • Should ignore *.gson too?
    • Running ./gradlew test caused a reload?
    • Side benefit - you can reload domain class changes
  • Changed logback.groovy and now it thinks it's an Application class? (clean resolved)

    • Cant reproduce in a fresh app.
    Execution failed for task ':bootRun'.
    > Unable to find a single main class from the following candidates [logback, app.grails4.Application]
    
  • Groovy 2.5.4

    • Doesn't include the Date Utils helpers by default - need to add them in.
      • compile 'org.codehaus.groovy:groovy-dateutil'
      • (Should just update to java.time.*)
    • JDK 11 Warnings (expected)
      • Disable by setting env var GROOVY_TURN_OFF_JAVA_WARNINGS=true
  • Dependancies (Gradle 5.1)

    • Odd issue where dependancies like com.jameskleeh:excel-builder - dont pull in their dependancies (eg: Apache POI)
  • Hibernate Depricated warnings (expected)

    • Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
    • Hide em in logback.groovy - logger('org.hibernate.orm.deprecation', ERROR, ['STDOUT'], false)
    • HHH020100: The Ehcache second-level cache provider for Hibernate is deprecated. See https://hibernate.atlassian.net/browse/HHH-12441 for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment