Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
ff8a4d0f
Commit
ff8a4d0f
authored
Aug 21, 2015
by
Dave Syer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.0.x'
Conflicts: MessageSourceAutoConfiguration.java
parents
2583f805
68b55ada
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
16 deletions
+18
-16
.gitignore
.gitignore
+1
-0
MessageSourceAutoConfiguration.java
...rk/boot/autoconfigure/MessageSourceAutoConfiguration.java
+16
-15
pom.xml
spring-boot-dependencies/pom.xml
+1
-1
No files found.
.gitignore
View file @
ff8a4d0f
...
...
@@ -15,6 +15,7 @@ bin
build
lib/
target
.factorypath
.springBeans
interpolated*.xml
dependency-reduced-pom.xml
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfiguration.java
View file @
ff8a4d0f
...
...
@@ -16,6 +16,9 @@
package
org
.
springframework
.
boot
.
autoconfigure
;
import
static
org
.
springframework
.
util
.
StringUtils
.
commaDelimitedListToStringArray
;
import
static
org
.
springframework
.
util
.
StringUtils
.
trimAllWhitespace
;
import
java.io.IOException
;
import
java.nio.charset.Charset
;
import
java.util.Iterator
;
...
...
@@ -24,6 +27,7 @@ import java.util.Set;
import
org.springframework.boot.autoconfigure.MessageSourceAutoConfiguration.ResourceBundleCondition
;
import
org.springframework.boot.autoconfigure.condition.ConditionOutcome
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.boot.autoconfigure.condition.SearchStrategy
;
import
org.springframework.boot.autoconfigure.condition.SpringBootCondition
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
...
...
@@ -40,9 +44,6 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
import
org.springframework.util.ConcurrentReferenceHashMap
;
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}.
*
...
...
@@ -51,7 +52,7 @@ import static org.springframework.util.StringUtils.trimAllWhitespace;
* @author Eddú Meléndez
*/
@Configuration
@ConditionalOnMissingBean
(
MessageSource
.
class
)
@ConditionalOnMissingBean
(
value
=
MessageSource
.
class
,
search
=
SearchStrategy
.
CURRENT
)
@AutoConfigureOrder
(
Ordered
.
HIGHEST_PRECEDENCE
)
@Conditional
(
ResourceBundleCondition
.
class
)
@EnableConfigurationProperties
...
...
@@ -90,7 +91,7 @@ public class MessageSourceAutoConfiguration {
ResourceBundleMessageSource
messageSource
=
new
ResourceBundleMessageSource
();
if
(
StringUtils
.
hasText
(
this
.
basename
))
{
messageSource
.
setBasenames
(
commaDelimitedListToStringArray
(
trimAllWhitespace
(
this
.
basename
)));
.
setBasenames
(
commaDelimitedListToStringArray
(
trimAllWhitespace
(
this
.
basename
)));
}
if
(
this
.
encoding
!=
null
)
{
messageSource
.
setDefaultEncoding
(
this
.
encoding
.
name
());
...
...
@@ -166,7 +167,7 @@ public class MessageSourceAutoConfiguration {
private
Resource
[]
getResources
(
ClassLoader
classLoader
,
String
name
)
{
try
{
return
new
SkipPatternPathMatchingResourcePatternResolver
(
classLoader
)
.
getResources
(
"classpath*:"
+
name
+
"*.properties"
);
.
getResources
(
"classpath*:"
+
name
+
"*.properties"
);
}
catch
(
Exception
ex
)
{
return
NO_RESOURCES
;
...
...
@@ -180,7 +181,7 @@ public class MessageSourceAutoConfiguration {
* contain messages.properties.
*/
private
static
class
SkipPatternPathMatchingResourcePatternResolver
extends
PathMatchingResourcePatternResolver
{
PathMatchingResourcePatternResolver
{
private
static
final
ClassLoader
ROOT_CLASSLOADER
;
static
{
...
...
@@ -197,14 +198,14 @@ public class MessageSourceAutoConfiguration {
}
private
static
final
String
[]
SKIPPED
=
{
"aspectjweaver-"
,
"hibernate-core-"
,
"hsqldb-"
,
"jackson-annotations-"
,
"jackson-core-"
,
"jackson-databind-"
,
"javassist-"
,
"snakeyaml-"
,
"spring-aop-"
,
"spring-beans-"
,
"spring-boot-"
,
"spring-boot-actuator-"
,
"spring-boot-autoconfigure-"
,
"spring-core-"
,
"spring-context-"
,
"spring-data-commons-"
,
"spring-expression-"
,
"spring-jdbc-"
,
"spring-orm-"
,
"spring-tx-"
,
"spring-web-"
,
"spring-webmvc-"
,
"tomcat-embed-"
,
"joda-time-"
,
"hibernate-entitymanager-"
,
"hibernate-validator-"
,
"logback-classic-"
,
"logback-core-"
,
"thymeleaf-"
};
"hsqldb-"
,
"jackson-annotations-"
,
"jackson-core-"
,
"jackson-databind-"
,
"javassist-"
,
"snakeyaml-"
,
"spring-aop-"
,
"spring-beans-"
,
"spring-boot-"
,
"spring-boot-actuator-"
,
"spring-boot-autoconfigure-"
,
"spring-core-"
,
"spring-context-"
,
"spring-data-commons-"
,
"spring-expression-"
,
"spring-jdbc-"
,
"spring-orm-"
,
"spring-tx-"
,
"spring-web-"
,
"spring-webmvc-"
,
"tomcat-embed-"
,
"joda-time-"
,
"hibernate-entitymanager-"
,
"hibernate-validator-"
,
"logback-classic-"
,
"logback-core-"
,
"thymeleaf-"
};
public
SkipPatternPathMatchingResourcePatternResolver
(
ClassLoader
classLoader
)
{
super
(
classLoader
);
...
...
spring-boot-dependencies/pom.xml
View file @
ff8a4d0f
...
...
@@ -2129,4 +2129,4 @@
<id>
integration-test
</id>
</profile>
</profiles>
</project>
</project>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment