diff --git a/examples/grails3-hibernate5-mongodb/build.gradle b/examples/grails3-hibernate5-mongodb/build.gradle index 4088f770..c55092d4 100644 --- a/examples/grails3-hibernate5-mongodb/build.gradle +++ b/examples/grails3-hibernate5-mongodb/build.gradle @@ -22,7 +22,13 @@ dependencies { runtimeOnly 'org.grails.plugins:scaffolding' runtimeOnly 'org.grails:grails-plugin-i18n' runtimeOnly 'org.grails:grails-plugin-url-mappings' - runtimeOnly 'org.hibernate:hibernate-ehcache' + runtimeOnly "org.hibernate:hibernate-ehcache:$hibernateVersion", { + // exclude javax variant of hibernate-core + exclude group: "org.hibernate", module: "hibernate-core" + } + runtimeOnly "org.jboss.spec.javax.transaction:jboss-transaction-api_1.3_spec:$jbossTransactionApiVersion", { + // required for hibernate-ehcache to work with javax variant of hibernate-core excluded + } runtimeOnly 'org.springframework.boot:spring-boot-autoconfigure' runtimeOnly 'org.springframework.boot:spring-boot-starter-logging' runtimeOnly 'org.springframework.boot:spring-boot-starter-tomcat' diff --git a/examples/gson-templates/grails-app/conf/application.yml b/examples/gson-templates/grails-app/conf/application.yml index d6167b9b..197837d4 100644 --- a/examples/gson-templates/grails-app/conf/application.yml +++ b/examples/gson-templates/grails-app/conf/application.yml @@ -69,13 +69,6 @@ grails: taglib: none staticparts: none --- -hibernate: - cache: - queries: false - use_second_level_cache: false - use_query_cache: false - #region.factory_class: 'org.hibernate.cache.ehcache.EhCacheRegionFactory' - endpoints: jmx: unique-names: true diff --git a/gradle.properties b/gradle.properties index 03af53d8..a2a79f63 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,6 +10,8 @@ testcontainersMongodbVersion=1.20.1 # for example apps only grailsSpringSecurityCoreVersion=7.0.0-SNAPSHOT grailsSpringSecurityRestVersion=6.0.0-SNAPSHOT +hibernateVersion=5.6.15.Final +jbossTransactionApiVersion=2.0.0.Final # This prevents the Grails Gradle Plugin from unnecessarily excluding slf4j-simple in the generated POMs # https://github.com/grails/grails-gradle-plugin/issues/222