mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-10 21:19:00 +08:00
♻️ Refactoring code. @SneakyThrows
This commit is contained in:
1 parent
f80d6d51e4
commit
271fefcdfc
37 files changed
+206
-171
No files matched your search
@@ -22,6 +22,7 @@ package com.pig4cloud.pigx.eureka.security;
|
||||
* @date 2018/7/12
|
||||
*/
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
@@ -29,11 +30,12 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
|
||||
@EnableWebSecurity
|
||||
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
@SneakyThrows
|
||||
protected void configure(HttpSecurity http) {
|
||||
http.csrf().disable()
|
||||
.authorizeRequests()
|
||||
.antMatchers("/actuator/**").permitAll()
|
||||
.anyRequest()
|
||||
.authenticated().and().httpBasic();
|
||||
.authorizeRequests()
|
||||
.antMatchers("/actuator/**").permitAll()
|
||||
.anyRequest()
|
||||
.authenticated().and().httpBasic();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user