66import org .springframework .context .annotation .Configuration ;
77import org .springframework .context .annotation .Profile ;
88import org .springframework .security .config .annotation .web .builders .HttpSecurity ;
9- import org .springframework .security .config .annotation .web .builders .WebSecurity ;
109import org .springframework .security .config .annotation .web .configuration .WebSecurityConfigurerAdapter ;
1110import org .springframework .security .web .authentication .SavedRequestAwareAuthenticationSuccessHandler ;
1211import org .springframework .security .web .csrf .CookieCsrfTokenRepository ;
1312import org .springframework .security .web .savedrequest .RequestCache ;
1413import org .springframework .security .web .savedrequest .SavedRequest ;
1514
16- import javax .servlet .http .*;
17- import java .util .*;
15+ import javax .servlet .http .Cookie ;
16+ import javax .servlet .http .HttpServletRequest ;
17+ import javax .servlet .http .HttpServletResponse ;
18+ import javax .servlet .http .HttpSession ;
19+ import java .util .Collection ;
20+ import java .util .List ;
21+ import java .util .Locale ;
22+ import java .util .Map ;
1823
1924@ Configuration
2025public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
2126 private final Logger log = LoggerFactory .getLogger (SecurityConfiguration .class );
2227
23- @ Override
24- public void configure (WebSecurity web ) throws Exception {
25- web .ignoring ().antMatchers ("/**/*.{js,html,css}" );
26- }
27-
2828 @ Override
2929 protected void configure (HttpSecurity http ) throws Exception {
3030 RequestCache requestCache = refererRequestCache ();
@@ -41,6 +41,7 @@ protected void configure(HttpSecurity http) throws Exception {
4141 .requestCache (requestCache )
4242 .and ()
4343 .authorizeRequests ()
44+ .antMatchers ("/**/*.{js,html,css}" ).permitAll ()
4445 .antMatchers ("/" , "/api/user" ).permitAll ()
4546 .anyRequest ().authenticated ();/*
4647 .and()
0 commit comments