|
1 | 1 | /*
|
2 |
| - * Copyright 2012-2023 the original author or authors. |
| 2 | + * Copyright 2012-2024 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
30 | 30 | import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
|
31 | 31 | import org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration.MessageSourceRuntimeHints;
|
32 | 32 | import org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration.ResourceBundleCondition;
|
33 |
| -import org.springframework.boot.context.properties.ConfigurationProperties; |
34 | 33 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
35 | 34 | import org.springframework.context.MessageSource;
|
36 | 35 | import org.springframework.context.annotation.Bean;
|
|
59 | 58 | @ConditionalOnMissingBean(name = AbstractApplicationContext.MESSAGE_SOURCE_BEAN_NAME, search = SearchStrategy.CURRENT)
|
60 | 59 | @AutoConfigureOrder(Ordered.HIGHEST_PRECEDENCE)
|
61 | 60 | @Conditional(ResourceBundleCondition.class)
|
62 |
| -@EnableConfigurationProperties |
| 61 | +@EnableConfigurationProperties(MessageSourceProperties.class) |
63 | 62 | @ImportRuntimeHints(MessageSourceRuntimeHints.class)
|
64 | 63 | public class MessageSourceAutoConfiguration {
|
65 | 64 |
|
66 | 65 | private static final Resource[] NO_RESOURCES = {};
|
67 | 66 |
|
68 |
| - @Bean |
69 |
| - @ConfigurationProperties(prefix = "spring.messages") |
70 |
| - public MessageSourceProperties messageSourceProperties() { |
71 |
| - return new MessageSourceProperties(); |
72 |
| - } |
73 |
| - |
74 | 67 | @Bean
|
75 | 68 | public MessageSource messageSource(MessageSourceProperties properties) {
|
76 | 69 | ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
|
|
0 commit comments