Fix example structure

This commit is contained in:
Stephane Nicoll 2015-05-27 11:10:14 +02:00
parent e3a124d0f9
commit 97cf86801b
1 changed files with 13 additions and 12 deletions

View File

@ -1659,21 +1659,22 @@ decorated and enhanced with the necessary pieces to get the `/login`
path working. For example, here we simply allow unauthenticated access
to the home page at "/" and keep the default for everything else:
[source,java] ----
@Configuration
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
[source,java,indent=0]
----
@Configuration
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
public void init(WebSecurity web) {
web.ignore("/");
}
@Override
public void init(WebSecurity web) {
web.ignore("/");
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http.antMatcher("/**").authorizeRequests().anyRequest().authenticated();
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http.antMatcher("/**").authorizeRequests().anyRequest().authenticated();
}
}
}
----
=== Actuator Security