matrei commented on code in PR #15565:
URL: https://github.com/apache/grails-core/pull/15565#discussion_r3058907151
##########
grails-domain-class/src/main/groovy/org/grails/plugins/domain/GrailsDomainClassAutoConfiguration.groovy:
##########
@@ -69,13 +68,6 @@ class GrailsDomainClassAutoConfiguration {
new DefaultConstraintEvaluatorFactoryBean(messageSources,
mappingContext, grailsApplication)
}
- @Lazy
- @Bean(name = ConstraintsEvaluator.BEAN_NAME)
- @Deprecated(since = '7.1', forRemoval = true)
- ConstraintEvaluatorAdapter
constraintsEvaluator(DefaultConstraintEvaluatorFactoryBean
validateableConstraintsEvaluator) {
- new ConstraintEvaluatorAdapter(validateableConstraintsEvaluator.object)
Review Comment:
No, you would need to call `ctx.getBean('validateableConstraintsEvaluator')`.
This is the usage in `grails-fields` for example:
```groovy
class FieldsGrailsPlugin extends Plugin {
static final String CONSTRAINTS_EVALULATOR_BEAN_NAME =
'validateableConstraintsEvaluator'
def grailsVersion = '7.0.0-SNAPSHOT > *'
def loadAfter = ['domainClass']
@Override
Closure doWithSpring() {
{ ->
beanPropertyAccessorFactory(BeanPropertyAccessorFactory) {
constraintsEvaluator = ref(CONSTRAINTS_EVALULATOR_BEAN_NAME)
proxyHandler = ref('proxyHandler')
fieldsDomainPropertyFactory =
ref('fieldsDomainPropertyFactory')
grailsDomainClassMappingContext =
ref('grailsDomainClassMappingContext')
}
formFieldsTemplateService(FormFieldsTemplateService)
fieldsDomainPropertyFactory(DomainPropertyFactoryImpl)
domainModelService(DomainModelServiceImpl) {
domainPropertyFactory = ref('fieldsDomainPropertyFactory')
}
}
}
}
```
--
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]