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
9d1b3a2b
Commit
9d1b3a2b
authored
Sep 04, 2018
by
Phillip Webb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.0.x'
parents
75937f5b
cafff430
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
36 additions
and
35 deletions
+36
-35
ConfigurationPropertiesReportEndpoint.java
...ext/properties/ConfigurationPropertiesReportEndpoint.java
+1
-3
ConditionalOnProperty.java
...k/boot/autoconfigure/condition/ConditionalOnProperty.java
+0
-3
OnPropertyListCondition.java
...boot/autoconfigure/condition/OnPropertyListCondition.java
+2
-2
OnWebApplicationCondition.java
...ot/autoconfigure/condition/OnWebApplicationCondition.java
+0
-2
MvcRequestMatcherProvider.java
...configure/security/servlet/MvcRequestMatcherProvider.java
+1
-0
RequestMatcherProvider.java
...utoconfigure/security/servlet/RequestMatcherProvider.java
+5
-0
AbstractErrorController.java
...oconfigure/web/servlet/error/AbstractErrorController.java
+1
-1
OnBootstrapHostsConditionTests.java
...toconfigure/couchbase/OnBootstrapHostsConditionTests.java
+1
-1
WebConversionServiceTests.java
...t/autoconfigure/web/format/WebConversionServiceTests.java
+1
-1
LiveReloadServerTests.java
...ework/boot/devtools/livereload/LiveReloadServerTests.java
+1
-1
SocketTargetServerConnectionTests.java
...ools/tunnel/server/SocketTargetServerConnectionTests.java
+1
-1
JavaPluginAction.java
.../springframework/boot/gradle/plugin/JavaPluginAction.java
+5
-0
SignalUtils.java
...va/org/springframework/boot/loader/tools/SignalUtils.java
+1
-1
EnvironmentConverter.java
...n/java/org/springframework/boot/EnvironmentConverter.java
+9
-9
ConfigFileApplicationListener.java
...rk/boot/context/config/ConfigFileApplicationListener.java
+4
-7
OriginTrackedFieldError.java
...t/properties/bind/validation/OriginTrackedFieldError.java
+1
-1
EnvironmentConverterTests.java
...a/org/springframework/boot/EnvironmentConverterTests.java
+1
-1
BeanCurrentlyInCreationFailureAnalyzerTests.java
...analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java
+1
-1
No files found.
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpoint.java
View file @
9d1b3a2b
...
...
@@ -406,9 +406,7 @@ public class ConfigurationPropertiesReportEndpoint implements ApplicationContext
&&
Character
.
isUpperCase
(
propertyName
.
charAt
(
1
)))
{
return
propertyName
;
}
else
{
return
StringUtils
.
capitalize
(
propertyName
);
}
return
StringUtils
.
capitalize
(
propertyName
);
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnProperty.java
View file @
9d1b3a2b
...
...
@@ -30,7 +30,6 @@ import org.springframework.core.env.Environment;
* default the properties must be present in the {@link Environment} and
* <strong>not</strong> equal to {@code false}. The {@link #havingValue()} and
* {@link #matchIfMissing()} attributes allow further customizations.
*
* <p>
* The {@link #havingValue} attribute can be used to specify the value that the property
* should have. The table below shows when a condition matches according to the property
...
...
@@ -67,12 +66,10 @@ import org.springframework.core.env.Environment;
* <td>yes</td>
* </tr>
* </table>
*
* <p>
* If the property is not contained in the {@link Environment} at all, the
* {@link #matchIfMissing()} attribute is consulted. By default missing attributes do not
* match.
*
* <p>
* This condition cannot be reliably used for matching collection properties. For example,
* in the following configuration, the condition matches if {@code spring.example.values}
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnPropertyListCondition.java
View file @
9d1b3a2b
...
...
@@ -36,7 +36,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
*/
public
class
OnPropertyListCondition
extends
SpringBootCondition
{
private
static
final
Bindable
<
List
<
String
>>
S
IMPLE
_LIST
=
Bindable
private
static
final
Bindable
<
List
<
String
>>
S
TRING
_LIST
=
Bindable
.
listOf
(
String
.
class
);
private
final
String
propertyName
;
...
...
@@ -59,7 +59,7 @@ public class OnPropertyListCondition extends SpringBootCondition {
public
ConditionOutcome
getMatchOutcome
(
ConditionContext
context
,
AnnotatedTypeMetadata
metadata
)
{
BindResult
<?>
property
=
Binder
.
get
(
context
.
getEnvironment
())
.
bind
(
this
.
propertyName
,
S
IMPLE
_LIST
);
.
bind
(
this
.
propertyName
,
S
TRING
_LIST
);
ConditionMessage
.
Builder
messageBuilder
=
this
.
messageBuilder
.
get
();
if
(
property
.
isBound
())
{
return
ConditionOutcome
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnWebApplicationCondition.java
View file @
9d1b3a2b
...
...
@@ -65,10 +65,8 @@ class OnWebApplicationCondition extends SpringBootCondition {
switch
(
deduceType
(
metadata
))
{
case
SERVLET:
return
isServletWebApplication
(
context
);
case
REACTIVE:
return
isReactiveWebApplication
(
context
);
default
:
return
isAnyWebApplication
(
context
,
required
);
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/servlet/MvcRequestMatcherProvider.java
View file @
9d1b3a2b
...
...
@@ -24,6 +24,7 @@ import org.springframework.web.servlet.handler.HandlerMappingIntrospector;
* used for Spring MVC applications.
*
* @author Madhura Bhave
* @since 2.0.5
*/
public
class
MvcRequestMatcherProvider
implements
RequestMatcherProvider
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/servlet/RequestMatcherProvider.java
View file @
9d1b3a2b
...
...
@@ -27,6 +27,11 @@ import org.springframework.security.web.util.matcher.RequestMatcher;
@FunctionalInterface
public
interface
RequestMatcherProvider
{
/**
* Return the {@link RequestMatcher} to be used for the specified pattern.
* @param pattern the request pattern
* @return a request matcher
*/
RequestMatcher
getRequestMatcher
(
String
pattern
);
}
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/AbstractErrorController.java
View file @
9d1b3a2b
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/couchbase/OnBootstrapHostsConditionTests.java
View file @
9d1b3a2b
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/format/WebConversionServiceTests.java
View file @
9d1b3a2b
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/livereload/LiveReloadServerTests.java
View file @
9d1b3a2b
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/server/SocketTargetServerConnectionTests.java
View file @
9d1b3a2b
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java
View file @
9d1b3a2b
...
...
@@ -149,6 +149,11 @@ final class JavaPluginAction implements PluginApplicationAction {
compile
.
doFirst
(
new
AdditionalMetadataLocationsConfigurer
());
}
/**
* Task {@link Action} to add additional meta-data locations. We need to use an
* inner-class rather than a lambda due to
* https://github.com/gradle/gradle/issues/5510.
*/
private
static
class
AdditionalMetadataLocationsConfigurer
implements
Action
<
Task
>
{
@Override
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/SignalUtils.java
View file @
9d1b3a2b
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/EnvironmentConverter.java
View file @
9d1b3a2b
...
...
@@ -42,7 +42,7 @@ final class EnvironmentConverter {
private
static
final
Set
<
String
>
SERVLET_ENVIRONMENT_SOURCE_NAMES
;
static
{
final
Set
<
String
>
names
=
new
HashSet
<>();
Set
<
String
>
names
=
new
HashSet
<>();
names
.
add
(
StandardServletEnvironment
.
SERVLET_CONTEXT_PROPERTY_SOURCE_NAME
);
names
.
add
(
StandardServletEnvironment
.
SERVLET_CONFIG_PROPERTY_SOURCE_NAME
);
names
.
add
(
StandardServletEnvironment
.
JNDI_PROPERTY_SOURCE_NAME
);
...
...
@@ -65,20 +65,20 @@ final class EnvironmentConverter {
* type. If the environment is already of the same type, no conversion is performed
* and it is returned unchanged.
* @param environment the Environment to convert
* @param
conversionT
ype the type to convert the Environment to
* @param
t
ype the type to convert the Environment to
* @return the converted Environment
*/
StandardEnvironment
convertEnvironmentIfNecessary
(
ConfigurableEnvironment
environment
,
Class
<?
extends
StandardEnvironment
>
conversionT
ype
)
{
if
(
conversionT
ype
.
equals
(
environment
.
getClass
()))
{
Class
<?
extends
StandardEnvironment
>
t
ype
)
{
if
(
t
ype
.
equals
(
environment
.
getClass
()))
{
return
(
StandardEnvironment
)
environment
;
}
return
convertEnvironment
(
environment
,
conversionT
ype
);
return
convertEnvironment
(
environment
,
t
ype
);
}
private
StandardEnvironment
convertEnvironment
(
ConfigurableEnvironment
environment
,
Class
<?
extends
StandardEnvironment
>
conversionT
ype
)
{
StandardEnvironment
result
=
createEnvironment
(
conversionT
ype
);
Class
<?
extends
StandardEnvironment
>
t
ype
)
{
StandardEnvironment
result
=
createEnvironment
(
t
ype
);
result
.
setActiveProfiles
(
environment
.
getActiveProfiles
());
result
.
setConversionService
(
environment
.
getConversionService
());
copyPropertySources
(
environment
,
result
);
...
...
@@ -86,9 +86,9 @@ final class EnvironmentConverter {
}
private
StandardEnvironment
createEnvironment
(
Class
<?
extends
StandardEnvironment
>
conversionT
ype
)
{
Class
<?
extends
StandardEnvironment
>
t
ype
)
{
try
{
return
conversionT
ype
.
newInstance
();
return
t
ype
.
newInstance
();
}
catch
(
Exception
ex
)
{
return
new
StandardEnvironment
();
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java
View file @
9d1b3a2b
...
...
@@ -454,15 +454,12 @@ public class ConfigFileApplicationListener
}
}
}
Set
<
String
>
processed
Extensions
=
new
HashSet
<>();
Set
<
String
>
processed
=
new
HashSet
<>();
for
(
PropertySourceLoader
loader
:
this
.
propertySourceLoaders
)
{
for
(
String
fileExtension
:
loader
.
getFileExtensions
())
{
if
(!
processedExtensions
.
contains
(
fileExtension
))
{
processedExtensions
.
add
(
fileExtension
);
String
prefix
=
location
+
name
;
fileExtension
=
"."
+
fileExtension
;
loadForFileExtension
(
loader
,
prefix
,
fileExtension
,
profile
,
filterFactory
,
consumer
);
if
(
processed
.
add
(
fileExtension
))
{
loadForFileExtension
(
loader
,
location
+
name
,
"."
+
fileExtension
,
profile
,
filterFactory
,
consumer
);
}
}
}
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/validation/OriginTrackedFieldError.java
View file @
9d1b3a2b
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/EnvironmentConverterTests.java
View file @
9d1b3a2b
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java
View file @
9d1b3a2b
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
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