|
|
|
|
@ -12,7 +12,6 @@ import org.springframework.security.config.annotation.method.configuration.Enabl
|
|
|
|
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
|
|
|
|
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
|
|
|
|
import org.springframework.security.config.http.SessionCreationPolicy;
|
|
|
|
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
|
|
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
|
|
|
|
import org.springframework.security.web.SecurityFilterChain;
|
|
|
|
|
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
|
|
|
|
|
@ -27,7 +26,7 @@ import java.util.Arrays;
|
|
|
|
|
*/
|
|
|
|
|
@Configuration
|
|
|
|
|
@EnableWebSecurity
|
|
|
|
|
@EnableMethodSecurity(prePostEnabled = true) // 启用方法级权限控制
|
|
|
|
|
@EnableMethodSecurity() // 启用方法级权限控制
|
|
|
|
|
public class SecurityConfig {
|
|
|
|
|
|
|
|
|
|
private final UserDetailsServiceImpl userDetailsService;
|
|
|
|
|
|