mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 09:35:29 +08:00
支持应用管理
This commit is contained in:
parent
506d0923b0
commit
f5c985aa4e
@ -58,8 +58,6 @@ spring:
|
||||
messages:
|
||||
# 国际化资源文件路径
|
||||
basename: i18n/messages
|
||||
profiles:
|
||||
active: @profiles.active@
|
||||
# 文件上传
|
||||
servlet:
|
||||
multipart:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
spring:
|
||||
profiles:
|
||||
active: local
|
||||
active: dev
|
||||
application:
|
||||
name: saas-tenant-admin
|
||||
config:
|
||||
@ -19,7 +19,7 @@ spring:
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: local
|
||||
on-profile: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
@ -33,20 +33,20 @@ spring:
|
||||
group: dev
|
||||
|
||||
---
|
||||
# dev
|
||||
# prod
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: dev
|
||||
on-profile: prod
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: http://nacos:8848
|
||||
namespace: c5c00044-93e6-4e66-8060-3f39aa7ab82b
|
||||
group: dev
|
||||
namespace: rrrrrrrrr
|
||||
group: prod
|
||||
config:
|
||||
server-addr: http://nacos:8848
|
||||
file-extension: yaml
|
||||
namespace: c5c00044-93e6-4e66-8060-3f39aa7ab82b
|
||||
group: dev
|
||||
namespace: rrrrrrrrr
|
||||
group: prod
|
||||
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
package org.dromara.common.security.config;
|
||||
|
||||
import cn.dev33.satoken.context.SaHolder;
|
||||
import cn.dev33.satoken.exception.NotLoginException;
|
||||
import cn.dev33.satoken.filter.SaServletFilter;
|
||||
import cn.dev33.satoken.httpauth.basic.SaHttpBasicUtil;
|
||||
import cn.dev33.satoken.interceptor.SaInterceptor;
|
||||
import cn.dev33.satoken.router.SaRouter;
|
||||
import cn.dev33.satoken.same.SaSameUtil;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.dev33.satoken.util.SaResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -87,6 +89,10 @@ public class SecurityConfig implements WebMvcConfigurer {
|
||||
.addInclude("/actuator", "/actuator/**")
|
||||
.setAuth(obj -> {
|
||||
SaHttpBasicUtil.check(username + ":" + password);
|
||||
|
||||
// 校验 Same-Token 身份凭证 —— 以下两句代码可简化为:SaSameUtil.checkCurrentRequestToken();
|
||||
String token = SaHolder.getRequest().getHeader(SaSameUtil.SAME_TOKEN);
|
||||
SaSameUtil.checkToken(token);
|
||||
})
|
||||
.setError(e -> SaResult.error(e.getMessage()).setCode(HttpStatus.UNAUTHORIZED));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user