三江统一登录代码修改
This commit is contained in:
parent
8beac86ac9
commit
68ba5df7ea
@ -31,7 +31,7 @@ public class UopModifyMessageReceiveListener {
|
||||
|
||||
@PostConstruct
|
||||
public void start() {
|
||||
if (profileJudgeUtil.isSjjtGsxDev()) {
|
||||
if (profileJudgeUtil.isSjjt()) {
|
||||
if (receiver != null) {
|
||||
receiver.stop();
|
||||
}
|
||||
@ -50,7 +50,7 @@ public class UopModifyMessageReceiveListener {
|
||||
|
||||
@PreDestroy
|
||||
public void end() {
|
||||
if (profileJudgeUtil.isSjjtGsxDev()) {
|
||||
if (profileJudgeUtil.isSjjt()) {
|
||||
receiver.stop();
|
||||
log.info("关闭mq");
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ public class JwtTokenFilter extends OncePerRequestFilter {
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
|
||||
if (securityEnable) {
|
||||
//三江统一认证,3.登录:过滤器判断,回调地址获取code调用获取令牌,首页根据令牌获取登录数据信息
|
||||
if (profileJudgeUtil.isSjjtGsxDev()) {
|
||||
if (profileJudgeUtil.isSjjt()) {
|
||||
try {
|
||||
validateSjProfile(request, response, filterChain);
|
||||
} catch (InvalidKeySpecException e) {
|
||||
|
||||
@ -3,6 +3,9 @@ package com.zhgd.xmgl.util;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 环境判断
|
||||
*/
|
||||
@ -29,6 +32,15 @@ public class ProfileJudgeUtil {
|
||||
return "sjjt-gsx".equals(activeProfile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否三江环境(包括本地、测试、生产)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isSjjt() {
|
||||
return Stream.of("sjjt-gsx", "sjjt-prod").anyMatch(s -> s.equals(activeProfile));
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否中建四局生产环境
|
||||
*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user