I have a problem or maybe I found an error in Spring Boot. At the moment, I'm not sure. I have a project with the following dependencies
- spring-boot-starter-thymeleaf
- spring-boot-starter-web
- spring boot boot starter drive
- spring-boot-starter-mail
- spring-cloud-starter-bus AMQP
- spring-cloud-starter-configuration
- spring -cloud-starter-eureka
I want to use messageSource in my Thymeleaf templates, so I set the following in my application.yml application:
spring:
messages:
basename: de/mycompany/messages/message
message.properties message_de.properties . .
MessageSourceAutoConfiguration , @Conditional (ResourceBundleCondition.class) . .
,
MessageSourceAutoConfiguration
- Bundle found for spring.messages.basename: de/mycompany/messages/message (MessageSourceAutoConfiguration.ResourceBundleCondition)
- @ConditionalOnMissingBean (types: org.springframework.context.MessageSource; SearchStrategy: all) found the following [messageSource] (OnBeanCondition)
, messageSource Bean, , , . :
AnnotationConfigEmbeddedWebApplicationContext : Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@60df7989]
AbstractApplicationContext initMessageSource ( 622).
Bean "messageSource", , DelegatingMessageSource.
- ? - , MessageSourceAutoConfiguration AbstractApplicationContext? ?
, messageSource @ Bean, AutoConfiguration :)