jamesfredley commented on code in PR #15541:
URL: https://github.com/apache/grails-core/pull/15541#discussion_r3030341459
##########
grails-data-hibernate5/core/build.gradle:
##########
@@ -91,3 +93,8 @@ apply {
from
rootProject.layout.projectDirectory.file('gradle/grails-data-tck-config.gradle')
from rootProject.layout.projectDirectory.file('gradle/docs-config.gradle')
}
+
+tasks.named('checkstyleMain', Checkstyle) {
+ // Exclude copied Spring Framework classes from checkstyle (they follow
Spring's code style)
+ exclude('**/org/grails/orm/hibernate/support/hibernate5/**')
Review Comment:
Done - created `grails-data-hibernate5/spring-orm` as a separate subproject.
All 22 vendored Spring ORM files have been moved there via `git mv`, registered
in `settings.gradle` as `grails-data-hibernate5-spring-orm`, and
`core/build.gradle` now depends on it. Original Spring copyright headers are
preserved and `NOTICE` updated with attribution.
##########
grails-data-hibernate5/core/src/test/groovy/org/apache/grails/data/hibernate5/core/GrailsDataHibernate5TckManager.groovy:
##########
@@ -35,8 +35,8 @@ import org.hibernate.SessionFactory
import org.hibernate.dialect.H2Dialect
import org.springframework.beans.factory.DisposableBean
import org.springframework.context.ApplicationContext
-import org.springframework.orm.hibernate5.SessionFactoryUtils
-import org.springframework.orm.hibernate5.SessionHolder
+import org.grails.orm.hibernate.support.hibernate5.SessionFactoryUtils
Review Comment:
Good point. We should add upgrade guide documentation for the Hibernate ORM
package relocations. Adding this to the list of follow-up documentation tasks
for the Spring Boot 4 upgrade guide.
##########
grails-data-mongodb/boot-plugin/src/test/groovy/org/grails/datastore/gorm/mongodb/boot/autoconfigure/MongoDbGormAutoConfigurationSpec.groovy:
##########
@@ -44,8 +44,8 @@ class MongoDbGormAutoConfigurationSpec extends
AutoStartedMongoSpec {
}
void setupSpec() {
- System.setProperty('spring.data.mongodb.host', dbContainer.getHost())
- System.setProperty('spring.data.mongodb.port',
dbContainer.getMappedPort(AbstractMongoGrailsExtension.DEFAULT_MONGO_PORT) as
String)
+ System.setProperty('spring.mongodb.host', dbContainer.getHost())
Review Comment:
Agreed - the MongoDB auto-configuration changes need to be documented in the
upgrade guide so users know about the updated configuration properties and any
behavioral changes.
##########
grails-datamapping-core/src/test/groovy/grails/gorm/annotation/transactions/TransactionalTransformSpec.groovy:
##########
@@ -198,7 +198,7 @@ import grails.gorm.transactions.Transactional
mySpec.getDeclaredMethod('$tt__$spock_feature_0_0', Object, Object,
Object, TransactionStatus)
and:"The spec can be called"
- mySpec.newInstance().'$tt__$spock_feature_0_0'(2,2,4,new
DefaultTransactionStatus(new Object(), true, true, false, false, null))
+ mySpec.newInstance().'$tt__$spock_feature_0_0'(2,2,4,new
DefaultTransactionStatus(null, new Object(), true, true, false, false, false,
null))
Review Comment:
The synchronization changes in Spring Framework 7 are around
`TransactionSynchronizationManager` - Spring moved to a more streamlined
synchronization model. The existing `@Transactional` behavior through GORM's
transform is preserved since we rely on
`TransactionSynchronizationManager.isActualTransactionActive()` which still
works the same way. The test assertions verify this. No gap in our logic from
what we can see - the transform still generates the same transactional proxy
wiring.
##########
grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy:
##########
@@ -452,11 +450,6 @@ ${importStatements}
}
}
- project.logger.info('Configuring CLASSIC boot loader for Micronaut
compatibility in {}', project.name)
Review Comment:
Yes, this is captured as a TODO. Micronaut does not yet fully support Spring
Boot 4 - the `BOOT4` markers throughout the codebase track all the places where
Micronaut integration needs attention once they release a compatible version.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]