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
f96dea70
Commit
f96dea70
authored
Dec 17, 2015
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
35efb251
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
14 deletions
+16
-14
Banner.java
...g-boot/src/main/java/org/springframework/boot/Banner.java
+1
-0
BeanDefinitionLoader.java
...n/java/org/springframework/boot/BeanDefinitionLoader.java
+0
-5
SpringApplication.java
...main/java/org/springframework/boot/SpringApplication.java
+10
-8
SpringApplicationAdminMXBeanRegistrar.java
...ork/boot/admin/SpringApplicationAdminMXBeanRegistrar.java
+1
-0
RelaxedConversionService.java
...g/springframework/boot/bind/RelaxedConversionService.java
+2
-0
RelaxedDataBinder.java
...java/org/springframework/boot/bind/RelaxedDataBinder.java
+2
-0
YamlJavaBeanPropertyConstructor.java
...gframework/boot/bind/YamlJavaBeanPropertyConstructor.java
+0
-1
No files found.
spring-boot/src/main/java/org/springframework/boot/Banner.java
View file @
f96dea70
...
...
@@ -57,6 +57,7 @@ public interface Banner {
* Print the banner to the log file.
*/
LOG
}
}
spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java
View file @
f96dea70
...
...
@@ -183,10 +183,8 @@ class BeanDefinitionLoader {
}
private
int
load
(
CharSequence
source
)
{
String
resolvedSource
=
this
.
xmlReader
.
getEnvironment
()
.
resolvePlaceholders
(
source
.
toString
());
// Attempt as a Class
try
{
return
load
(
ClassUtils
.
forName
(
resolvedSource
,
null
));
...
...
@@ -197,7 +195,6 @@ class BeanDefinitionLoader {
catch
(
ClassNotFoundException
ex
)
{
// swallow exception and continue
}
// Attempt as resources
Resource
[]
resources
=
findResources
(
resolvedSource
);
int
loadCount
=
0
;
...
...
@@ -211,13 +208,11 @@ class BeanDefinitionLoader {
if
(
atLeastOneResourceExists
)
{
return
loadCount
;
}
// Attempt as package
Package
packageResource
=
findPackage
(
resolvedSource
);
if
(
packageResource
!=
null
)
{
return
load
(
packageResource
);
}
throw
new
IllegalArgumentException
(
"Invalid source '"
+
resolvedSource
+
"'"
);
}
...
...
spring-boot/src/main/java/org/springframework/boot/SpringApplication.java
View file @
f96dea70
...
...
@@ -383,17 +383,23 @@ public class SpringApplication {
return
getSpringFactoriesInstances
(
type
,
new
Class
<?>[]
{});
}
@SuppressWarnings
(
"unchecked"
)
private
<
T
>
Collection
<?
extends
T
>
getSpringFactoriesInstances
(
Class
<
T
>
type
,
Class
<?>[]
parameterTypes
,
Object
...
args
)
{
ClassLoader
classLoader
=
Thread
.
currentThread
().
getContextClassLoader
();
// Use names and ensure unique to protect against duplicates
Set
<
String
>
names
=
new
LinkedHashSet
<
String
>(
SpringFactoriesLoader
.
loadFactoryNames
(
type
,
classLoader
));
List
<
T
>
instances
=
new
ArrayList
<
T
>(
names
.
size
());
List
<
T
>
instances
=
createSpringFactoriesInstances
(
type
,
parameterTypes
,
classLoader
,
args
,
names
);
AnnotationAwareOrderComparator
.
sort
(
instances
);
return
instances
;
}
// Create instances from the names
@SuppressWarnings
(
"unchecked"
)
private
<
T
>
List
<
T
>
createSpringFactoriesInstances
(
Class
<
T
>
type
,
Class
<?>[]
parameterTypes
,
ClassLoader
classLoader
,
Object
[]
args
,
Set
<
String
>
names
)
{
List
<
T
>
instances
=
new
ArrayList
<
T
>(
names
.
size
());
for
(
String
name
:
names
)
{
try
{
Class
<?>
instanceClass
=
ClassUtils
.
forName
(
name
,
classLoader
);
...
...
@@ -407,8 +413,6 @@ public class SpringApplication {
"Cannot instantiate "
+
type
+
" : "
+
name
,
ex
);
}
}
AnnotationAwareOrderComparator
.
sort
(
instances
);
return
instances
;
}
...
...
@@ -420,7 +424,6 @@ public class SpringApplication {
return
new
StandardServletEnvironment
();
}
return
new
StandardEnvironment
();
}
/**
...
...
@@ -608,7 +611,6 @@ public class SpringApplication {
}
}
}
if
(
this
.
resourceLoader
!=
null
)
{
if
(
context
instanceof
GenericApplicationContext
)
{
((
GenericApplicationContext
)
context
)
...
...
spring-boot/src/main/java/org/springframework/boot/admin/SpringApplicationAdminMXBeanRegistrar.java
View file @
f96dea70
...
...
@@ -122,6 +122,7 @@ public class SpringApplicationAdminMXBeanRegistrar
logger
.
info
(
"Application shutdown requested."
);
SpringApplicationAdminMXBeanRegistrar
.
this
.
applicationContext
.
close
();
}
}
}
spring-boot/src/main/java/org/springframework/boot/bind/RelaxedConversionService.java
View file @
f96dea70
...
...
@@ -140,7 +140,9 @@ class RelaxedConversionService implements ConversionService {
throw
new
IllegalArgumentException
(
"No enum constant "
+
this
.
enumType
.
getCanonicalName
()
+
"."
+
source
);
}
}
}
}
spring-boot/src/main/java/org/springframework/boot/bind/RelaxedDataBinder.java
View file @
f96dea70
...
...
@@ -629,6 +629,7 @@ public class RelaxedDataBinder extends DataBinder {
public
String
toString
()
{
return
"["
+
this
.
name
+
"]"
;
}
}
private
static
class
PropertyNode
extends
PathNode
{
...
...
@@ -645,6 +646,7 @@ public class RelaxedDataBinder extends DataBinder {
public
String
toString
()
{
return
"."
+
this
.
name
;
}
}
}
...
...
spring-boot/src/main/java/org/springframework/boot/bind/YamlJavaBeanPropertyConstructor.java
View file @
f96dea70
...
...
@@ -65,7 +65,6 @@ public class YamlJavaBeanPropertyConstructor extends Constructor {
*/
protected
final
void
addPropertyAlias
(
String
alias
,
Class
<?>
type
,
String
name
)
{
Map
<
String
,
Property
>
typeMap
=
this
.
properties
.
get
(
type
);
if
(
typeMap
==
null
)
{
typeMap
=
new
HashMap
<
String
,
Property
>();
this
.
properties
.
put
(
type
,
typeMap
);
...
...
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