This is an automated email from the ASF dual-hosted git repository. jamesfredley pushed a commit to branch fix/8.0.x-merge-sb4-fallout in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 752701a8c27fe71522f8f53de2b600991fc9ffa6 Author: James Fredley <[email protected]> AuthorDate: Thu May 21 19:32:15 2026 -0400 Add spring-boot-hibernate dep to graphql spring-boot-app for SB4 module split The merge from 7.2.x moved this standalone Spring Boot demo from grails-data-graphql/examples/spring-boot-app/ to its current location and updated DemoApplication.groovy to import the Spring Boot 4 path org.springframework.boot.hibernate.autoconfigure.HibernateJpaAutoConfiguration, but the build.gradle was not updated to actually depend on the module that class now lives in. The result was that :grails-test-examples-graphql-spring-boot-app :compileGroovy failed every CI job that runs ./gradlew build including the main Build Grails-Core matrix on every OS/JDK combo, Functional Tests, Hibernate5 Functional Tests and MongoDB Functional Tests, because all of those jobs depend on the root build target. The class must be on the runtime classpath (not compileOnly) because GORM's HibernateGormAutoConfiguration declares @AutoConfigureBefore([HibernateJpaAutoConfiguration]). Without it present at runtime the GORM auto config silently fails to load and HibernateDatastore never gets registered, which AuthorIntegrationTests exposes. Spring Boot's own JPA auto configuration is still suppressed by the existing @EnableAutoConfiguration(exclude = ...) annotation in DemoApplication, so GORM remains the sole Hibernate configurer. Assisted-by: claude-code:claude-opus-4-7 --- grails-test-examples/graphql/spring-boot-app/build.gradle | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/grails-test-examples/graphql/spring-boot-app/build.gradle b/grails-test-examples/graphql/spring-boot-app/build.gradle index 9ec90ca31f..3c983c6aac 100644 --- a/grails-test-examples/graphql/spring-boot-app/build.gradle +++ b/grails-test-examples/graphql/spring-boot-app/build.gradle @@ -37,6 +37,13 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter' implementation 'org.springframework.boot:spring-boot-starter-web' + // Spring Boot 4 moved HibernateJpaAutoConfiguration to the spring-boot-hibernate module. + // It must be on the runtime classpath: GORM's HibernateGormAutoConfiguration + // declares @AutoConfigureBefore([HibernateJpaAutoConfiguration]), and DemoApplication + // references the class in @EnableAutoConfiguration(exclude = ...). Spring Boot's actual + // JPA auto-configuration is then suppressed by that exclusion so GORM owns Hibernate. + implementation 'org.springframework.boot:spring-boot-hibernate' + // GORM + Hibernate 5 (Jakarta variant), configured via GORM's Spring Boot auto-config // (registers HibernateDatastore, dataSource, transactionManager as Spring beans). implementation 'org.apache.grails:grails-data-hibernate5-spring-boot'
