Commit 65b264b5 by yw

项目初始化

parent 2d3e43ac
...@@ -33,6 +33,13 @@ public class DataResourceServerConfig extends ResourceServerConfigurerAdapter { ...@@ -33,6 +33,13 @@ public class DataResourceServerConfig extends ResourceServerConfigurerAdapter {
public void configure(HttpSecurity http) throws Exception { public void configure(HttpSecurity http) throws Exception {
http.csrf().disable() http.csrf().disable()
.authorizeRequests() .authorizeRequests()
.antMatchers(
"/actuator/**",
"/v2/api-docs/**",
"/swagger-ui.html",
"/doc.html",
"/swagger-resources/**",
"/webjars/**").permitAll()
.anyRequest().permitAll() .anyRequest().permitAll()
.and().httpBasic(); .and().httpBasic();
} }
......
...@@ -27,13 +27,6 @@ public class DataWebSecurityConfigurer extends WebSecurityConfigurerAdapter { ...@@ -27,13 +27,6 @@ public class DataWebSecurityConfigurer extends WebSecurityConfigurerAdapter {
protected void configure(HttpSecurity http) throws Exception { protected void configure(HttpSecurity http) throws Exception {
http http
.authorizeRequests() .authorizeRequests()
.antMatchers(
"/actuator/**",
"/v2/api-docs/**",
"/swagger-ui.html",
"/doc.html",
"/swagger-resources/**",
"/webjars/**").permitAll()
.anyRequest().authenticated() .anyRequest().authenticated()
.and().csrf().disable(); .and().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