【同步】BOOT 和 CLOUD 的功能

pull/146/MERGE
YunaiV 2024-10-01 15:20:25 +08:00
parent 4249528d0f
commit c3ac4384fa
5 changed files with 7 additions and 11 deletions

View File

@ -13,8 +13,7 @@ import org.springframework.security.config.annotation.web.configurers.AuthorizeH
@Configuration(proxyBeanMethods = false, value = "aiSecurityConfiguration") @Configuration(proxyBeanMethods = false, value = "aiSecurityConfiguration")
public class SecurityConfiguration { public class SecurityConfiguration {
@Bean("aiAuthorizeRequestsCustomizer")
@Bean("infraAuthorizeRequestsCustomizer")
public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() { public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
return new AuthorizeRequestsCustomizer() { return new AuthorizeRequestsCustomizer() {

View File

@ -6,10 +6,9 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer; import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer;
/** /**
* Member Security * Product Security
*/ */
@Configuration("productSecurityConfiguration") @Configuration("productSecurityConfiguration")
public class SecurityConfiguration { public class SecurityConfiguration {

View File

@ -1,12 +1,11 @@
package cn.iocoder.yudao.module.trade.framework.security.config; package cn.iocoder.yudao.module.trade.framework.security.config;
import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer; import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
import cn.iocoder.yudao.module.member.enums.ApiConstants; import cn.iocoder.yudao.module.trade.enums.ApiConstants;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer; import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer;
/** /**
* Trade Security * Trade Security

View File

@ -6,15 +6,14 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer; import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer;
/** /**
* System Security * MP Security
*/ */
@Configuration(proxyBeanMethods = false, value = "systemSecurityConfiguration") @Configuration(proxyBeanMethods = false, value = "mpSecurityConfiguration")
public class SecurityConfiguration { public class SecurityConfiguration {
@Bean("systemAuthorizeRequestsCustomizer") @Bean("mpAuthorizeRequestsCustomizer")
public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() { public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
return new AuthorizeRequestsCustomizer() { return new AuthorizeRequestsCustomizer() {