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
58df752a
Commit
58df752a
authored
Jul 16, 2018
by
Johnny Lim
Committed by
Stephane Nicoll
Jul 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
See gh-13790
parent
43091150
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
34 deletions
+20
-34
spring.factories
...utoconfigure/src/main/resources/META-INF/spring.factories
+1
-1
ReactiveManagementWebSecurityAutoConfigurationTests.java
.../ReactiveManagementWebSecurityAutoConfigurationTests.java
+2
-5
MetricsWebClientFilterFunctionTests.java
.../reactive/client/MetricsWebClientFilterFunctionTests.java
+5
-8
pom.xml
spring-boot-project/spring-boot-dependencies/pom.xml
+5
-5
spring-boot-features.adoc
...ing-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+2
-2
CompositePropertySources.java
...ork/boot/context/properties/CompositePropertySources.java
+5
-13
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/spring.factories
View file @
58df752a
...
@@ -61,8 +61,8 @@ org.springframework.boot.actuate.autoconfigure.mongo.MongoHealthIndicatorAutoCon
...
@@ -61,8 +61,8 @@ org.springframework.boot.actuate.autoconfigure.mongo.MongoHealthIndicatorAutoCon
org.springframework.boot.actuate.autoconfigure.neo4j.Neo4jHealthIndicatorAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.neo4j.Neo4jHealthIndicatorAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.redis.RedisHealthIndicatorAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.redis.RedisHealthIndicatorAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.scheduling.ScheduledTasksEndpointAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.scheduling.ScheduledTasksEndpointAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.security.reactive.ReactiveManagementWebSecurityAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.security.reactive.ReactiveManagementWebSecurityAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.session.SessionsEndpointAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.session.SessionsEndpointAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.solr.SolrHealthIndicatorAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.solr.SolrHealthIndicatorAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.system.DiskSpaceHealthIndicatorAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.system.DiskSpaceHealthIndicatorAutoConfiguration,\
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/reactive/ReactiveManagementWebSecurityAutoConfigurationTests.java
View file @
58df752a
...
@@ -119,12 +119,9 @@ public class ReactiveManagementWebSecurityAutoConfigurationTests {
...
@@ -119,12 +119,9 @@ public class ReactiveManagementWebSecurityAutoConfigurationTests {
@Test
@Test
public
void
backsOffWhenWebFilterChainProxyBeanPresent
()
{
public
void
backsOffWhenWebFilterChainProxyBeanPresent
()
{
this
.
contextRunner
this
.
contextRunner
.
withUserConfiguration
(
WebFilterChainProxyConfiguration
.
class
)
.
withConfiguration
(
AutoConfigurations
.
of
(
ReactiveSecurityAutoConfiguration
.
class
))
.
withUserConfiguration
(
WebFilterChainProxyConfiguration
.
class
)
.
run
((
context
)
->
{
.
run
((
context
)
->
{
assertThat
(
getLocationHeader
(
context
,
"/health"
).
toString
())
assertThat
(
getLocationHeader
(
context
,
"/
actuator/
health"
).
toString
())
.
contains
(
"/login"
);
.
contains
(
"/login"
);
assertThat
(
getLocationHeader
(
context
,
"/foo"
).
toString
())
assertThat
(
getLocationHeader
(
context
,
"/foo"
).
toString
())
.
contains
(
"/login"
);
.
contains
(
"/login"
);
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/MetricsWebClientFilterFunctionTests.java
View file @
58df752a
...
@@ -23,6 +23,7 @@ import java.util.concurrent.TimeUnit;
...
@@ -23,6 +23,7 @@ import java.util.concurrent.TimeUnit;
import
io.micrometer.core.instrument.MeterRegistry
;
import
io.micrometer.core.instrument.MeterRegistry
;
import
io.micrometer.core.instrument.MockClock
;
import
io.micrometer.core.instrument.MockClock
;
import
io.micrometer.core.instrument.Timer
;
import
io.micrometer.core.instrument.simple.SimpleConfig
;
import
io.micrometer.core.instrument.simple.SimpleConfig
;
import
io.micrometer.core.instrument.simple.SimpleMeterRegistry
;
import
io.micrometer.core.instrument.simple.SimpleMeterRegistry
;
import
org.junit.Before
;
import
org.junit.Before
;
...
@@ -128,14 +129,10 @@ public class MetricsWebClientFilterFunctionTests {
...
@@ -128,14 +129,10 @@ public class MetricsWebClientFilterFunctionTests {
this
.
filterFunction
.
filter
(
request
,
exchange
).
retry
(
1
)
this
.
filterFunction
.
filter
(
request
,
exchange
).
retry
(
1
)
.
onErrorResume
(
IllegalArgumentException
.
class
,
(
t
)
->
Mono
.
empty
())
.
onErrorResume
(
IllegalArgumentException
.
class
,
(
t
)
->
Mono
.
empty
())
.
block
();
.
block
();
assertThat
(
this
.
registry
Timer
timer
=
this
.
registry
.
get
(
"http.client.requests"
).
tags
(
"method"
,
"GET"
,
.
get
(
"http.client.requests"
).
tags
(
"method"
,
"GET"
,
"uri"
,
"uri"
,
"/projects/spring-boot"
,
"status"
,
"CLIENT_ERROR"
).
timer
();
"/projects/spring-boot"
,
"status"
,
"CLIENT_ERROR"
)
assertThat
(
timer
.
count
()).
isEqualTo
(
2
);
.
timer
().
count
()).
isEqualTo
(
2
);
assertThat
(
timer
.
max
(
TimeUnit
.
MILLISECONDS
)).
isLessThan
(
600
);
assertThat
(
this
.
registry
.
get
(
"http.client.requests"
)
.
tags
(
"method"
,
"GET"
,
"uri"
,
"/projects/spring-boot"
,
"status"
,
"CLIENT_ERROR"
)
.
timer
().
max
(
TimeUnit
.
MILLISECONDS
)).
isLessThan
(
600
);
}
}
}
}
spring-boot-project/spring-boot-dependencies/pom.xml
View file @
58df752a
...
@@ -1026,16 +1026,16 @@
...
@@ -1026,16 +1026,16 @@
<artifactId>
javax.mail-api
</artifactId>
<artifactId>
javax.mail-api
</artifactId>
<version>
${javax-mail.version}
</version>
<version>
${javax-mail.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
javax.persistence
</groupId>
<artifactId>
javax.persistence-api
</artifactId>
<version>
${javax-persistence.version}
</version>
</dependency>
<dependency>
<dependency>
<groupId>
javax.money
</groupId>
<groupId>
javax.money
</groupId>
<artifactId>
money-api
</artifactId>
<artifactId>
money-api
</artifactId>
<version>
${javax-money.version}
</version>
<version>
${javax-money.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
javax.persistence
</groupId>
<artifactId>
javax.persistence-api
</artifactId>
<version>
${javax-persistence.version}
</version>
</dependency>
<dependency>
<dependency>
<groupId>
javax.servlet
</groupId>
<groupId>
javax.servlet
</groupId>
<artifactId>
javax.servlet-api
</artifactId>
<artifactId>
javax.servlet-api
</artifactId>
...
...
spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
View file @
58df752a
...
@@ -3260,8 +3260,8 @@ default. The `management.endpoints.web.exposure.include` property can be used to
...
@@ -3260,8 +3260,8 @@ default. The `management.endpoints.web.exposure.include` property can be used to
the actuators.
the actuators.
If Spring Security is on the classpath and no other WebSecurityConfigurerAdapter is
If Spring Security is on the classpath and no other WebSecurityConfigurerAdapter is
present, all actuators other than `/health` and `/info` are secured by Spring Boot auto-config.
present, all actuators other than `/health` and `/info` are secured by Spring Boot auto-config
uration
.
If you define a custom `WebSecurityConfigurerAdapter`, Spring Boot auto-config will back off and you will be in
If you define a custom `WebSecurityConfigurerAdapter`, Spring Boot auto-config
uration
will back off and you will be in
full control of actuator access rules.
full control of actuator access rules.
NOTE: Before setting the `management.endpoints.web.exposure.include`, ensure that the
NOTE: Before setting the `management.endpoints.web.exposure.include`, ensure that the
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/CompositePropertySources.java
View file @
58df752a
...
@@ -19,6 +19,7 @@ package org.springframework.boot.context.properties;
...
@@ -19,6 +19,7 @@ package org.springframework.boot.context.properties;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
org.springframework.core.env.PropertySource
;
import
org.springframework.core.env.PropertySource
;
import
org.springframework.core.env.PropertySources
;
import
org.springframework.core.env.PropertySources
;
...
@@ -45,23 +46,14 @@ final class CompositePropertySources implements PropertySources {
...
@@ -45,23 +46,14 @@ final class CompositePropertySources implements PropertySources {
@Override
@Override
public
boolean
contains
(
String
name
)
{
public
boolean
contains
(
String
name
)
{
for
(
PropertySources
sources
:
this
.
propertySources
)
{
return
this
.
propertySources
.
stream
()
if
(
sources
.
contains
(
name
))
{
.
anyMatch
((
sources
)
->
sources
.
contains
(
name
));
return
true
;
}
}
return
false
;
}
}
@Override
@Override
public
PropertySource
<?>
get
(
String
name
)
{
public
PropertySource
<?>
get
(
String
name
)
{
for
(
PropertySources
sources
:
this
.
propertySources
)
{
return
this
.
propertySources
.
stream
().
map
((
sources
)
->
sources
.
get
(
name
))
PropertySource
<?>
source
=
sources
.
get
(
name
);
.
filter
(
Objects:
:
nonNull
).
findFirst
().
orElse
(
null
);
if
(
source
!=
null
)
{
return
source
;
}
}
return
null
;
}
}
}
}
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