From 688e232ab4cc61d3a502670be0fd4782f467f84a Mon Sep 17 00:00:00 2001 From: James Fredley Date: Tue, 10 Sep 2024 02:08:09 -0400 Subject: [PATCH] Switch to @Qualifier annotation to help Spring select the right messageSource bean --- .../grails/plugin/json/view/test/JsonViewTest.groovy | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/json/src/main/groovy/grails/plugin/json/view/test/JsonViewTest.groovy b/json/src/main/groovy/grails/plugin/json/view/test/JsonViewTest.groovy index b381aeb81..98f62646e 100644 --- a/json/src/main/groovy/grails/plugin/json/view/test/JsonViewTest.groovy +++ b/json/src/main/groovy/grails/plugin/json/view/test/JsonViewTest.groovy @@ -15,8 +15,8 @@ import groovy.text.Template import groovy.transform.CompileStatic import org.grails.datastore.mapping.keyvalue.mapping.config.KeyValueMappingContext import org.grails.datastore.mapping.model.MappingContext -import org.grails.spring.context.support.PluginAwareResourceBundleMessageSource import org.springframework.beans.factory.annotation.Autowired +import org.springframework.beans.factory.annotation.Qualifier import org.springframework.context.MessageSource import org.springframework.http.HttpStatus @@ -33,11 +33,7 @@ trait JsonViewTest { MessageSource messageSource @Autowired(required = false) - void setMessageSource(PluginAwareResourceBundleMessageSource messageSource) { - this.messageSource = messageSource - } - - void setMessageSource(MessageSource messageSource) { + void setMessageSource(@Qualifier("pluginAwareResourceBundleMessageSource") MessageSource messageSource) { this.messageSource = messageSource }