my-csc-config-file.git 5 anni fa
parent
commit
13ec45a1b8

+ 4 - 1
src/main/java/com/unissoft/config/WebSecurityConfig.java

@@ -22,7 +22,10 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
22
 //        http.csrf();//防csrf攻击
22
 //        http.csrf();//防csrf攻击
23
         http.csrf().disable();//防csrf攻击 禁用
23
         http.csrf().disable();//防csrf攻击 禁用
24
         http.authorizeRequests()
24
         http.authorizeRequests()
25
-                .antMatchers("/oauth/**").permitAll();
25
+                .antMatchers("/actuator/**").permitAll()//不对springboot-admin监控的请求进行权限校验
26
+                .antMatchers("/instances/**").permitAll()//不对springboot-admin监控的实例信息请求进行权限校验
27
+                .antMatchers("/oauth/**").permitAll()
28
+                .anyRequest().authenticated().and().logout().disable();
26
     }
29
     }
27
 
30
 
28
     /**
31
     /**