【同步】BOOT 和 CLOUD 的功能
parent
4249528d0f
commit
c3ac4384fa
|
@ -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() {
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 配置
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue