diff --git a/youlai-common/common-security/src/main/java/com/youlai/common/security/config/ResourceServerConfig.java b/youlai-common/common-security/src/main/java/com/youlai/common/security/config/ResourceServerConfig.java index 992dac1a3..bdc952084 100644 --- a/youlai-common/common-security/src/main/java/com/youlai/common/security/config/ResourceServerConfig.java +++ b/youlai-common/common-security/src/main/java/com/youlai/common/security/config/ResourceServerConfig.java @@ -12,6 +12,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; import org.springframework.security.authentication.AbstractAuthenticationToken; +import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity; 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.WebSecurityCustomizer; @@ -38,6 +39,7 @@ import java.util.List; @ConfigurationProperties(prefix = "security") @Configuration @EnableWebSecurity +@EnableMethodSecurity @RequiredArgsConstructor @Slf4j public class ResourceServerConfig {