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
f03849d5
Commit
f03849d5
authored
Apr 10, 2018
by
Johnny Lim
Committed by
Stephane Nicoll
Apr 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
See gh-12812
parent
a9020df9
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
25 additions
and
34 deletions
+25
-34
MeterRegistryConfigurer.java
...ctuate/autoconfigure/metrics/MeterRegistryConfigurer.java
+2
-3
WebFluxMetricsAutoConfiguration.java
...metrics/web/reactive/WebFluxMetricsAutoConfiguration.java
+1
-1
MeterRegistryCustomizerTests.java
...e/autoconfigure/metrics/MeterRegistryCustomizerTests.java
+1
-1
NewRelicMetricsExportAutoConfigurationTests.java
...newrelic/NewRelicMetricsExportAutoConfigurationTests.java
+1
-3
SignalFxMetricsExportAutoConfigurationTests.java
...signalfx/SignalFxMetricsExportAutoConfigurationTests.java
+0
-1
AbstractHealthIndicator.java
...ramework/boot/actuate/health/AbstractHealthIndicator.java
+1
-1
MetricsWebFilter.java
...actuate/metrics/web/reactive/server/MetricsWebFilter.java
+1
-1
production-ready-features.adoc
...oot-docs/src/main/asciidoc/production-ready-features.adoc
+3
-3
CustomWebFluxSecurityExample.java
.../boot/docs/web/security/CustomWebFluxSecurityExample.java
+3
-5
WebTestClientSpringBootTestIntegrationTests.java
...ebclient/WebTestClientSpringBootTestIntegrationTests.java
+1
-2
ApplicationContextAssert.java
...k/boot/test/context/assertj/ApplicationContextAssert.java
+5
-5
TestRestTemplateTests.java
...framework/boot/test/web/client/TestRestTemplateTests.java
+1
-1
ConfigurationPropertySourcesTests.java
.../properties/source/ConfigurationPropertySourcesTests.java
+0
-1
README.adoc
spring-boot-samples/README.adoc
+1
-1
application.properties
...ot-sample-kafka/src/main/resources/application.properties
+2
-2
SampleSecureWebFluxCustomSecurityTests.java
...ecure/webflux/SampleSecureWebFluxCustomSecurityTests.java
+2
-3
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/MeterRegistryConfigurer.java
View file @
f03849d5
...
@@ -25,13 +25,12 @@ import io.micrometer.core.instrument.binder.MeterBinder;
...
@@ -25,13 +25,12 @@ import io.micrometer.core.instrument.binder.MeterBinder;
import
io.micrometer.core.instrument.composite.CompositeMeterRegistry
;
import
io.micrometer.core.instrument.composite.CompositeMeterRegistry
;
import
io.micrometer.core.instrument.config.MeterFilter
;
import
io.micrometer.core.instrument.config.MeterFilter
;
import
org.springframework.beans.factory.config.BeanPostProcessor
;
import
org.springframework.boot.util.LambdaSafe
;
import
org.springframework.boot.util.LambdaSafe
;
/**
/**
*
{@link BeanPostProcessor}
to apply {@link MeterRegistryCustomizer customizers},
*
Configurer
to apply {@link MeterRegistryCustomizer customizers},
* {@link MeterFilter filters}, {@link MeterBinder binders} and {@link Metrics#addRegistry
* {@link MeterFilter filters}, {@link MeterBinder binders} and {@link Metrics#addRegistry
* global registration} to {@link MeterRegistry meter registries}. This
post processo
r
* global registration} to {@link MeterRegistry meter registries}. This
configure
r
* intentionally skips {@link CompositeMeterRegistry} with the assumptions that the
* intentionally skips {@link CompositeMeterRegistry} with the assumptions that the
* registries it contains are beans and will be customized directly.
* registries it contains are beans and will be customized directly.
*
*
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/web/reactive/WebFluxMetricsAutoConfiguration.java
View file @
f03849d5
...
@@ -34,7 +34,7 @@ import org.springframework.context.annotation.Configuration;
...
@@ -34,7 +34,7 @@ import org.springframework.context.annotation.Configuration;
/**
/**
* {@link EnableAutoConfiguration Auto-configuration} for instrumentation of Spring
* {@link EnableAutoConfiguration Auto-configuration} for instrumentation of Spring
* Web
f
lux MVC annotation-based programming model request mappings.
* Web
F
lux MVC annotation-based programming model request mappings.
*
*
* @author Jon Schneider
* @author Jon Schneider
* @since 2.0.0
* @since 2.0.0
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/MeterRegistryCustomizerTests.java
View file @
f03849d5
...
@@ -85,7 +85,7 @@ public class MeterRegistryCustomizerTests {
...
@@ -85,7 +85,7 @@ public class MeterRegistryCustomizerTests {
}
}
@Bean
@Bean
public
MeterRegistryCustomizer
<
PrometheusMeterRegistry
>
promet
eh
usOnlyCommonTags
()
{
public
MeterRegistryCustomizer
<
PrometheusMeterRegistry
>
promet
he
usOnlyCommonTags
()
{
return
(
registry
)
->
registry
.
config
().
commonTags
(
"job"
,
"myjob"
);
return
(
registry
)
->
registry
.
config
().
commonTags
(
"job"
,
"myjob"
);
}
}
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/newrelic/NewRelicMetricsExportAutoConfigurationTests.java
View file @
f03849d5
...
@@ -80,9 +80,7 @@ public class NewRelicMetricsExportAutoConfigurationTests {
...
@@ -80,9 +80,7 @@ public class NewRelicMetricsExportAutoConfigurationTests {
@Test
@Test
public
void
autoConfigurationCanBeDisabled
()
{
public
void
autoConfigurationCanBeDisabled
()
{
this
.
contextRunner
.
withUserConfiguration
(
BaseConfiguration
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
BaseConfiguration
.
class
)
.
withPropertyValues
(
"management.metrics.export.newrelic.enabled=false"
,
.
withPropertyValues
(
"management.metrics.export.newrelic.enabled=false"
)
"management.metrics.export.newrelic.api-key=abcde"
,
"management.metrics.export.newrelic.account-id=12345"
)
.
run
((
context
)
->
assertThat
(
context
)
.
run
((
context
)
->
assertThat
(
context
)
.
doesNotHaveBean
(
NewRelicMeterRegistry
.
class
)
.
doesNotHaveBean
(
NewRelicMeterRegistry
.
class
)
.
doesNotHaveBean
(
NewRelicConfig
.
class
));
.
doesNotHaveBean
(
NewRelicConfig
.
class
));
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/signalfx/SignalFxMetricsExportAutoConfigurationTests.java
View file @
f03849d5
...
@@ -72,7 +72,6 @@ public class SignalFxMetricsExportAutoConfigurationTests {
...
@@ -72,7 +72,6 @@ public class SignalFxMetricsExportAutoConfigurationTests {
public
void
autoConfigurationCanBeDisabled
()
{
public
void
autoConfigurationCanBeDisabled
()
{
this
.
contextRunner
.
withUserConfiguration
(
BaseConfiguration
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
BaseConfiguration
.
class
)
.
withPropertyValues
(
.
withPropertyValues
(
"management.metrics.export.signalfx.access-token=abcde"
,
"management.metrics.export.signalfx.enabled=false"
)
"management.metrics.export.signalfx.enabled=false"
)
.
run
((
context
)
->
assertThat
(
context
)
.
run
((
context
)
->
assertThat
(
context
)
.
doesNotHaveBean
(
SignalFxMeterRegistry
.
class
)
.
doesNotHaveBean
(
SignalFxMeterRegistry
.
class
)
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/AbstractHealthIndicator.java
View file @
f03849d5
...
@@ -50,7 +50,7 @@ public abstract class AbstractHealthIndicator implements HealthIndicator {
...
@@ -50,7 +50,7 @@ public abstract class AbstractHealthIndicator implements HealthIndicator {
* Create a new {@link AbstractHealthIndicator} instance with a default
* Create a new {@link AbstractHealthIndicator} instance with a default
* {@code healthCheckFailedMessage}.
* {@code healthCheckFailedMessage}.
*/
*/
p
ublic
AbstractHealthIndicator
()
{
p
rotected
AbstractHealthIndicator
()
{
this
(
NO_MESSAGE
);
this
(
NO_MESSAGE
);
}
}
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilter.java
View file @
f03849d5
...
@@ -30,7 +30,7 @@ import org.springframework.web.server.WebFilter;
...
@@ -30,7 +30,7 @@ import org.springframework.web.server.WebFilter;
import
org.springframework.web.server.WebFilterChain
;
import
org.springframework.web.server.WebFilterChain
;
/**
/**
* Intercepts incoming HTTP requests modeled with the Web
f
lux annotation-based programming
* Intercepts incoming HTTP requests modeled with the Web
F
lux annotation-based programming
* model.
* model.
*
*
* @author Jon Schneider
* @author Jon Schneider
...
...
spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc
View file @
f03849d5
...
@@ -551,7 +551,7 @@ JMX or an HTTP request is converted to the required types using an instance of
...
@@ -551,7 +551,7 @@ JMX or an HTTP request is converted to the required types using an instance of
[[production-ready-endpoints-custom-web]]
[[production-ready-endpoints-custom-web]]
==== Custom Web Endpoints
==== Custom Web Endpoints
Operations on a `@Endpoint`, `@WebEndpoint`, or `@WebEndpointExtension` are automatically
Operations on a
n
`@Endpoint`, `@WebEndpoint`, or `@WebEndpointExtension` are automatically
exposed over HTTP using Jersey, Spring MVC, or Spring WebFlux.
exposed over HTTP using Jersey, Spring MVC, or Spring WebFlux.
...
@@ -673,7 +673,7 @@ possible.
...
@@ -673,7 +673,7 @@ possible.
==== Controller endpoints
==== Controller endpoints
`@ControllerEndpoint` and `@RestControllerEndpoint` can be used to implement an endpoint
`@ControllerEndpoint` and `@RestControllerEndpoint` can be used to implement an endpoint
that is only exposed by Spring MVC or Spring WebFlux. Methods are mapped using the
that is only exposed by Spring MVC or Spring WebFlux. Methods are mapped using the
standard annotations
Spring MVC and Spring WebFlux annotations
such as `@RequestMapping`
standard annotations
for Spring MVC and Spring WebFlux
such as `@RequestMapping`
and `@GetMapping`, with the endpoint's ID being used as a prefix for the path. Controller
and `@GetMapping`, with the endpoint's ID being used as a prefix for the path. Controller
endpoints provide deeper integration with Spring's web frameworks but at the expense of
endpoints provide deeper integration with Spring's web frameworks but at the expense of
portability. The `@Endpoint` and `@WebEndpoint` annotations should be preferred whenever
portability. The `@Endpoint` and `@WebEndpoint` annotations should be preferred whenever
...
@@ -1763,7 +1763,7 @@ is required. A `CacheMetricsRegistrar` bean is made available to make that proce
...
@@ -1763,7 +1763,7 @@ is required. A `CacheMetricsRegistrar` bean is made available to make that proce
[[production-ready-metrics-jdbc]]
[[production-ready-metrics-jdbc]]
==== DataSource Metrics
==== DataSource Metrics
Auto-configuration enables the instrumentation of all available DataSource` objects with a
Auto-configuration enables the instrumentation of all available
`
DataSource` objects with a
metric named `jdbc`. Data source instrumentation results in gauges representing the
metric named `jdbc`. Data source instrumentation results in gauges representing the
currently active, maximum allowed, and minimum allowed connections in the pool. Each of
currently active, maximum allowed, and minimum allowed connections in the pool. Each of
these gauges has a name that is prefixed by `jdbc`.
these gauges has a name that is prefixed by `jdbc`.
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/security/CustomWebFluxSecurityExample.java
View file @
f03849d5
...
@@ -18,7 +18,6 @@ package org.springframework.boot.docs.web.security;
...
@@ -18,7 +18,6 @@ package org.springframework.boot.docs.web.security;
import
org.springframework.boot.autoconfigure.security.reactive.PathRequest
;
import
org.springframework.boot.autoconfigure.security.reactive.PathRequest
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity
;
import
org.springframework.security.config.web.server.ServerHttpSecurity
;
import
org.springframework.security.config.web.server.ServerHttpSecurity
;
import
org.springframework.security.web.server.SecurityWebFilterChain
;
import
org.springframework.security.web.server.SecurityWebFilterChain
;
...
@@ -27,20 +26,19 @@ import org.springframework.security.web.server.SecurityWebFilterChain;
...
@@ -27,20 +26,19 @@ import org.springframework.security.web.server.SecurityWebFilterChain;
*
*
* @author Madhura Bhave
* @author Madhura Bhave
*/
*/
@EnableWebFluxSecurity
public
class
CustomWebFluxSecurityExample
{
public
class
CustomWebFluxSecurityExample
{
// @formatter:off
// @formatter:off
// tag::configuration[]
// tag::configuration[]
@Bean
@Bean
public
SecurityWebFilterChain
springSecurityFilterChain
(
ServerHttpSecurity
http
)
{
public
SecurityWebFilterChain
springSecurityFilterChain
(
ServerHttpSecurity
http
)
{
http
return
http
.
authorizeExchange
()
.
authorizeExchange
()
.
matchers
(
PathRequest
.
toStaticResources
().
atCommonLocations
()).
permitAll
()
.
matchers
(
PathRequest
.
toStaticResources
().
atCommonLocations
()).
permitAll
()
.
pathMatchers
(
"/foo"
,
"/bar"
)
.
pathMatchers
(
"/foo"
,
"/bar"
)
.
authenticated
().
and
()
.
authenticated
().
and
()
.
formLogin
()
;
.
formLogin
()
.
and
()
return
http
.
build
();
.
build
();
}
}
// end::configuration[]
// end::configuration[]
// @formatter:on
// @formatter:on
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/webclient/WebTestClientSpringBootTestIntegrationTests.java
View file @
f03849d5
...
@@ -74,8 +74,7 @@ public class WebTestClientSpringBootTestIntegrationTests {
...
@@ -74,8 +74,7 @@ public class WebTestClientSpringBootTestIntegrationTests {
@Bean
@Bean
public
SecurityWebFilterChain
springSecurityFilterChain
(
ServerHttpSecurity
http
)
{
public
SecurityWebFilterChain
springSecurityFilterChain
(
ServerHttpSecurity
http
)
{
http
.
authorizeExchange
().
anyExchange
().
permitAll
();
return
http
.
authorizeExchange
().
anyExchange
().
permitAll
().
and
().
build
();
return
http
.
build
();
}
}
}
}
...
...
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/assertj/ApplicationContextAssert.java
View file @
f03849d5
...
@@ -110,7 +110,7 @@ public class ApplicationContextAssert<C extends ApplicationContext>
...
@@ -110,7 +110,7 @@ public class ApplicationContextAssert<C extends ApplicationContext>
* Verifies that the application context contains a single bean with the given type.
* Verifies that the application context contains a single bean with the given type.
* <p>
* <p>
* Example: <pre class="code">
* Example: <pre class="code">
* assertThat(context).hasSingleBean(Foo.class); </pre>
* assertThat(context).hasSingleBean(Foo.class
, Scope.NO_ANCESTORS
); </pre>
* @param type the bean type
* @param type the bean type
* @param scope the scope of the assertion
* @param scope the scope of the assertion
* @return {@code this} assertion object.
* @return {@code this} assertion object.
...
@@ -159,7 +159,7 @@ public class ApplicationContextAssert<C extends ApplicationContext>
...
@@ -159,7 +159,7 @@ public class ApplicationContextAssert<C extends ApplicationContext>
* Verifies that the application context does not contain any beans of the given type.
* Verifies that the application context does not contain any beans of the given type.
* <p>
* <p>
* Example: <pre class="code">
* Example: <pre class="code">
* assertThat(context).doesNotHaveBean(Foo.class); </pre>
* assertThat(context).doesNotHaveBean(Foo.class
, Scope.NO_ANCESTORS
); </pre>
* @param type the bean type
* @param type the bean type
* @param scope the scope of the assertion
* @param scope the scope of the assertion
* @return {@code this} assertion object.
* @return {@code this} assertion object.
...
@@ -255,8 +255,8 @@ public class ApplicationContextAssert<C extends ApplicationContext>
...
@@ -255,8 +255,8 @@ public class ApplicationContextAssert<C extends ApplicationContext>
* assert on {@code null} is returned.
* assert on {@code null} is returned.
* <p>
* <p>
* Example: <pre class="code">
* Example: <pre class="code">
* assertThat(context).getBean(Foo.class).isInstanceOf(DefaultFoo.class);
* assertThat(context).getBean(Foo.class
, Scope.NO_ANCESTORS
).isInstanceOf(DefaultFoo.class);
* assertThat(context).getBean(Bar.class).isNull();</pre>
* assertThat(context).getBean(Bar.class
, Scope.NO_ANCESTORS
).isNull();</pre>
* @param <T> the bean type
* @param <T> the bean type
* @param type the bean type
* @param type the bean type
* @param scope the scope of the assertion
* @param scope the scope of the assertion
...
@@ -374,7 +374,7 @@ public class ApplicationContextAssert<C extends ApplicationContext>
...
@@ -374,7 +374,7 @@ public class ApplicationContextAssert<C extends ApplicationContext>
* can be found an assert on an empty {@code map} is returned.
* can be found an assert on an empty {@code map} is returned.
* <p>
* <p>
* Example: <pre class="code">
* Example: <pre class="code">
* assertThat(context).getBeans(Foo.class).containsKey("foo");
* assertThat(context).getBeans(Foo.class
, Scope.NO_ANCESTORS
).containsKey("foo");
* </pre>
* </pre>
* @param <T> the bean type
* @param <T> the bean type
* @param type the bean type
* @param type the bean type
...
...
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/TestRestTemplateTests.java
View file @
f03849d5
...
@@ -142,7 +142,7 @@ public class TestRestTemplateTests {
...
@@ -142,7 +142,7 @@ public class TestRestTemplateTests {
.
willReturn
(
new
DefaultUriBuilderFactory
());
.
willReturn
(
new
DefaultUriBuilderFactory
());
RestTemplateBuilder
builder
=
mock
(
RestTemplateBuilder
.
class
);
RestTemplateBuilder
builder
=
mock
(
RestTemplateBuilder
.
class
);
given
(
builder
.
build
()).
willReturn
(
delegate
);
given
(
builder
.
build
()).
willReturn
(
delegate
);
final
TestRestTemplate
restTemplate
=
new
TestRestTemplate
(
builder
);
TestRestTemplate
restTemplate
=
new
TestRestTemplate
(
builder
);
ReflectionUtils
.
doWithMethods
(
RestOperations
.
class
,
new
MethodCallback
()
{
ReflectionUtils
.
doWithMethods
(
RestOperations
.
class
,
new
MethodCallback
()
{
@Override
@Override
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/ConfigurationPropertySourcesTests.java
View file @
f03849d5
...
@@ -60,7 +60,6 @@ public class ConfigurationPropertySourcesTests {
...
@@ -60,7 +60,6 @@ public class ConfigurationPropertySourcesTests {
public
void
attachShouldReAttachInMergedSetup
()
{
public
void
attachShouldReAttachInMergedSetup
()
{
ConfigurableEnvironment
parent
=
new
StandardEnvironment
();
ConfigurableEnvironment
parent
=
new
StandardEnvironment
();
ConfigurationPropertySources
.
attach
(
parent
);
ConfigurationPropertySources
.
attach
(
parent
);
parent
.
getProperty
(
"my.example-property"
);
ConfigurableEnvironment
child
=
new
StandardEnvironment
();
ConfigurableEnvironment
child
=
new
StandardEnvironment
();
child
.
merge
(
parent
);
child
.
merge
(
parent
);
child
.
getPropertySources
().
addLast
(
new
MapPropertySource
(
"config"
,
child
.
getPropertySources
().
addLast
(
new
MapPropertySource
(
"config"
,
...
...
spring-boot-samples/README.adoc
View file @
f03849d5
...
@@ -120,7 +120,7 @@ The following sample applications are provided:
...
@@ -120,7 +120,7 @@ The following sample applications are provided:
| Demonstrates JUnit Jupiter-based testing
| Demonstrates JUnit Jupiter-based testing
| link:spring-boot-sample-kafka[spring-boot-sample-kafka]
| link:spring-boot-sample-kafka[spring-boot-sample-kafka]
|
c
onsumer and producer using Apache Kafka
|
C
onsumer and producer using Apache Kafka
| link:spring-boot-sample-liquibase[spring-boot-sample-liquibase]
| link:spring-boot-sample-liquibase[spring-boot-sample-liquibase]
| Database migrations with Liquibase
| Database migrations with Liquibase
...
...
spring-boot-samples/spring-boot-sample-kafka/src/main/resources/application.properties
View file @
f03849d5
...
@@ -2,5 +2,5 @@ spring.kafka.bootstrap-servers=localhost:9092
...
@@ -2,5 +2,5 @@ spring.kafka.bootstrap-servers=localhost:9092
spring.kafka.consumer.group-id
=
testGroup
spring.kafka.consumer.group-id
=
testGroup
spring.kafka.consumer.auto-offset-reset
=
earliest
spring.kafka.consumer.auto-offset-reset
=
earliest
spring.kafka.consumer.value-deserializer
=
org.springframework.kafka.support.serializer.JsonDeserializer
spring.kafka.consumer.value-deserializer
=
org.springframework.kafka.support.serializer.JsonDeserializer
spring.kafka.producer.value-serializer
=
org.springframework.kafka.support.serializer.JsonSerializer
spring.kafka.consumer.properties.spring.json.trusted.packages
=
sample.kafka
spring.kafka.consumer.properties.spring.json.trusted.packages
=
sample.kafka
spring.kafka.producer.value-serializer
=
org.springframework.kafka.support.serializer.JsonSerializer
\ No newline at end of file
\ No newline at end of file
spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxCustomSecurityTests.java
View file @
f03849d5
...
@@ -116,15 +116,14 @@ public class SampleSecureWebFluxCustomSecurityTests {
...
@@ -116,15 +116,14 @@ public class SampleSecureWebFluxCustomSecurityTests {
@Bean
@Bean
public
SecurityWebFilterChain
springSecurityFilterChain
(
ServerHttpSecurity
http
)
{
public
SecurityWebFilterChain
springSecurityFilterChain
(
ServerHttpSecurity
http
)
{
http
.
authorizeExchange
().
matchers
(
EndpointRequest
.
to
(
"health"
,
"info"
))
return
http
.
authorizeExchange
().
matchers
(
EndpointRequest
.
to
(
"health"
,
"info"
))
.
permitAll
()
.
permitAll
()
.
matchers
(
EndpointRequest
.
toAnyEndpoint
()
.
matchers
(
EndpointRequest
.
toAnyEndpoint
()
.
excluding
(
MappingsEndpoint
.
class
))
.
excluding
(
MappingsEndpoint
.
class
))
.
hasRole
(
"ACTUATOR"
)
.
hasRole
(
"ACTUATOR"
)
.
matchers
(
PathRequest
.
toStaticResources
().
atCommonLocations
())
.
matchers
(
PathRequest
.
toStaticResources
().
atCommonLocations
())
.
permitAll
().
pathMatchers
(
"/login"
).
permitAll
().
anyExchange
()
.
permitAll
().
pathMatchers
(
"/login"
).
permitAll
().
anyExchange
()
.
authenticated
().
and
().
httpBasic
();
.
authenticated
().
and
().
httpBasic
().
and
().
build
();
return
http
.
build
();
}
}
}
}
...
...
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