List of usage examples for org.springframework.security.config.annotation.web.builders HttpSecurity userDetailsService
public HttpSecurity userDetailsService(UserDetailsService userDetailsService) throws Exception
From source file:org.joinfaces.example.SecurityConfig.java
@Override protected void configure(HttpSecurity http) { try {/*from w w w . ja v a 2 s . c o m*/ http.csrf().disable(); http.userDetailsService(userDetailsService()).authorizeRequests().antMatchers("/").permitAll() .antMatchers("/index.jsf").permitAll().antMatchers("/javax.faces.resource/**").permitAll() .anyRequest().authenticated().and().formLogin().loginPage("/login.jsf").permitAll() .failureUrl("/login.jsf?error=true").defaultSuccessUrl("/index.jsf").and().logout() .logoutSuccessUrl("/login.jsf"); } catch (Exception ex) { throw new RuntimeException(ex); } }