[BAEL-7608] - Fixed SecurityIntegrationTest with redirecting to login

This commit is contained in:
amit2103
2018-07-31 00:41:20 +05:30
parent 7c83e6d22e
commit 680e0c24a7
3 changed files with 3 additions and 3 deletions
@@ -11,7 +11,7 @@ import org.springframework.web.server.adapter.WebHttpHandlerBuilder;
import reactor.ipc.netty.NettyContext;
import reactor.ipc.netty.http.server.HttpServer;
@ComponentScan(basePackages = {"com.baeldung.security"})
@ComponentScan(basePackages = {"com.baeldung.reactive.security"})
@EnableWebFlux
public class SpringSecurity5Application {
@@ -19,7 +19,7 @@ public class SecurityConfig {
@Bean
public SecurityWebFilterChain securitygWebFilterChain(ServerHttpSecurity http) {
return http.authorizeExchange()
.pathMatchers("/admin")
.pathMatchers("/", "/admin")
.hasAuthority("ROLE_ADMIN")
.matchers(EndpointRequest.to(FeaturesEndpoint.class))
.permitAll()