grails3.2.0

Grails 3.2.0 Bootstrap.groovy script doesn't execute

我们两清 提交于 2020-06-27 17:11:18
问题 After i updated my project from Grails 3.1.11 to 3.2.0 the project has stopped working. When i start proj from IDE, it works fine. But when i pack it to jar and try to run in terminal, BootStrap.groovy does not execute. What is the problem? 回答1: I just found an issue on GitHub. Now BootStrap.groovy and UrlMappings.groovy should be in the default package Default package is indicated in application.yml grails: codegen: defaultPackage: com.example.app Migration docs has no information about this

Register custom constraints

China☆狼群 提交于 2019-12-25 07:49:02
问题 I'm trying to upgrade Grails 2.3.7 project to Grails 3.2.3. In 2.3.7, I used custom constraints and register them in /conf/Config.groovy using: org.codehaus.groovy.grails.validation.ConstrainedProperty.registerNewConstraint('description', my.validation.DescriptionConstraint) Then I can use something like this in domain: static constraints = { approvedDate(description: '>= applyDate') } However, in Grails 3.2.3, When I put above command (and remove org.codehaus.groovy from package name) in

Grails 3 session timeout not working when deployed to Tomcat

妖精的绣舞 提交于 2019-12-12 04:22:51
问题 I'm using Grails 3.2.3 . I've increased the session timeout as described here https://stackoverflow.com/a/30861747/2405040 i.e. adding the following in application.yml : server: session: timeout: 604800 #one week in seconds This is working fine while in development i.e. session.getMaxInactiveInterval() returns 604800 but when I'm deploying the WAR on a Tomcat (using Tomcat 8.5.6 ), this session timeout setting is not reflected and the value is default to 1800 seconds. "org.springframework