See gh-12812
This commit is contained in:
Johnny Lim
2018-04-10 14:13:37 +09:00
committed by Stephane Nicoll
parent a9020df9b9
commit f03849d502
16 changed files with 25 additions and 34 deletions

View File

@@ -120,7 +120,7 @@ The following sample applications are provided:
| Demonstrates JUnit Jupiter-based testing
| link:spring-boot-sample-kafka[spring-boot-sample-kafka]
| consumer and producer using Apache Kafka
| Consumer and producer using Apache Kafka
| link:spring-boot-sample-liquibase[spring-boot-sample-liquibase]
| Database migrations with Liquibase

View File

@@ -2,5 +2,5 @@ spring.kafka.bootstrap-servers=localhost:9092
spring.kafka.consumer.group-id=testGroup
spring.kafka.consumer.auto-offset-reset=earliest
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

View File

@@ -116,15 +116,14 @@ public class SampleSecureWebFluxCustomSecurityTests {
@Bean
public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
http.authorizeExchange().matchers(EndpointRequest.to("health", "info"))
return http.authorizeExchange().matchers(EndpointRequest.to("health", "info"))
.permitAll()
.matchers(EndpointRequest.toAnyEndpoint()
.excluding(MappingsEndpoint.class))
.hasRole("ACTUATOR")
.matchers(PathRequest.toStaticResources().atCommonLocations())
.permitAll().pathMatchers("/login").permitAll().anyExchange()
.authenticated().and().httpBasic();
return http.build();
.authenticated().and().httpBasic().and().build();
}
}