diff --git a/novel-crawl/src/main/java/com/java2nb/novel/core/config/SecurityConfiguration.java b/novel-crawl/src/main/java/com/java2nb/novel/core/config/SecurityConfiguration.java index 995705c..6b7dead 100644 --- a/novel-crawl/src/main/java/com/java2nb/novel/core/config/SecurityConfiguration.java +++ b/novel-crawl/src/main/java/com/java2nb/novel/core/config/SecurityConfiguration.java @@ -50,7 +50,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter { protected void configure(HttpSecurity http) throws Exception { http.csrf().disable()//禁用了 csrf 功能 .authorizeRequests()//限定签名成功的请求 - //.antMatchers("/**").hasRole("ADMIN") + .antMatchers("/**").hasRole("ADMIN") .anyRequest().permitAll()//其他没有限定的请求,允许访问 .and().anonymous()//对于没有配置权限的其他请求允许匿名访问 .and().formLogin()//使用 spring security 默认登录页面