|
|
|
@ -16,7 +16,11 @@ |
|
|
|
|
|
|
|
|
|
|
|
package org.springframework.boot.autoconfigure; |
|
|
|
package org.springframework.boot.autoconfigure; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import static org.springframework.util.StringUtils.commaDelimitedListToStringArray; |
|
|
|
|
|
|
|
import static org.springframework.util.StringUtils.trimAllWhitespace; |
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; |
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; |
|
|
|
|
|
|
|
import org.springframework.boot.autoconfigure.condition.SearchStrategy; |
|
|
|
import org.springframework.boot.bind.RelaxedPropertyResolver; |
|
|
|
import org.springframework.boot.bind.RelaxedPropertyResolver; |
|
|
|
import org.springframework.context.EnvironmentAware; |
|
|
|
import org.springframework.context.EnvironmentAware; |
|
|
|
import org.springframework.context.MessageSource; |
|
|
|
import org.springframework.context.MessageSource; |
|
|
|
@ -28,16 +32,13 @@ import org.springframework.core.annotation.Order; |
|
|
|
import org.springframework.core.env.Environment; |
|
|
|
import org.springframework.core.env.Environment; |
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
import static org.springframework.util.StringUtils.commaDelimitedListToStringArray; |
|
|
|
|
|
|
|
import static org.springframework.util.StringUtils.trimAllWhitespace; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* {@link EnableAutoConfiguration Auto-configuration} for {@link MessageSource}. |
|
|
|
* {@link EnableAutoConfiguration Auto-configuration} for {@link MessageSource}. |
|
|
|
* |
|
|
|
* |
|
|
|
* @author Dave Syer |
|
|
|
* @author Dave Syer |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Configuration |
|
|
|
@Configuration |
|
|
|
@ConditionalOnMissingBean(MessageSource.class) |
|
|
|
@ConditionalOnMissingBean(value=MessageSource.class, search=SearchStrategy.CURRENT) |
|
|
|
@Order(Ordered.HIGHEST_PRECEDENCE) |
|
|
|
@Order(Ordered.HIGHEST_PRECEDENCE) |
|
|
|
public class MessageSourceAutoConfiguration implements EnvironmentAware { |
|
|
|
public class MessageSourceAutoConfiguration implements EnvironmentAware { |
|
|
|
|
|
|
|
|
|
|
|
|