Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit fe2af79

Browse files
authored
Merge pull request #800 from grails/hibernate-ehcache-breaking-change
Update example projects to set hibernate-ehcache dependency
2 parents ab9ebd8 + 705a722 commit fe2af79

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

examples/grails3-hibernate5-mongodb/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ dependencies {
2222
runtimeOnly 'org.grails.plugins:scaffolding'
2323
runtimeOnly 'org.grails:grails-plugin-i18n'
2424
runtimeOnly 'org.grails:grails-plugin-url-mappings'
25-
runtimeOnly 'org.hibernate:hibernate-ehcache'
25+
runtimeOnly "org.hibernate:hibernate-ehcache:$hibernateVersion", {
26+
// exclude javax variant of hibernate-core
27+
exclude group: "org.hibernate", module: "hibernate-core"
28+
}
29+
runtimeOnly "org.jboss.spec.javax.transaction:jboss-transaction-api_1.3_spec:$jbossTransactionApiVersion", {
30+
// required for hibernate-ehcache to work with javax variant of hibernate-core excluded
31+
}
2632
runtimeOnly 'org.springframework.boot:spring-boot-autoconfigure'
2733
runtimeOnly 'org.springframework.boot:spring-boot-starter-logging'
2834
runtimeOnly 'org.springframework.boot:spring-boot-starter-tomcat'

examples/gson-templates/grails-app/conf/application.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,6 @@ grails:
6969
taglib: none
7070
staticparts: none
7171
---
72-
hibernate:
73-
cache:
74-
queries: false
75-
use_second_level_cache: false
76-
use_query_cache: false
77-
#region.factory_class: 'org.hibernate.cache.ehcache.EhCacheRegionFactory'
78-
7972
endpoints:
8073
jmx:
8174
unique-names: true

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ testcontainersMongodbVersion=1.20.1
1010
# for example apps only
1111
grailsSpringSecurityCoreVersion=7.0.0-SNAPSHOT
1212
grailsSpringSecurityRestVersion=6.0.0-SNAPSHOT
13+
hibernateVersion=5.6.15.Final
14+
jbossTransactionApiVersion=2.0.0.Final
1315

1416
# This prevents the Grails Gradle Plugin from unnecessarily excluding slf4j-simple in the generated POMs
1517
# https://github.com/grails/grails-gradle-plugin/issues/222

0 commit comments

Comments
 (0)