1@Override
2protected void configure(HttpSecurity http) throws Exception {
3
4 String[] staticResources = {
5 "/css/**",
6 "/images/**",
7 "/fonts/**",
8 "/scripts/**",
9 };
10
11 http
12 .authorizeRequests()
13 .antMatchers(staticResources).permitAll()
14 .anyRequest().authenticated()
15 .and()
16 .formLogin()
17 .loginPage("/login").permitAll()
18 .and()
19 .logout().permitAll();
20}
21