Commit 03229683 by qiuchaofei

1.放开/actuator/的访问

parent 5c7a33db
......@@ -184,6 +184,12 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
</dependencyManagement>
......
......@@ -36,7 +36,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
if (permit)
http.httpBasic().and().authorizeRequests().anyRequest().permitAll();
else {
http.httpBasic().and().authorizeRequests().anyRequest().authenticated();
http.httpBasic().and()
.authorizeRequests().antMatchers("/actuator/**").permitAll().and()
.authorizeRequests().anyRequest().authenticated();
}
http.csrf().disable();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment