三江统一登录代码修改
This commit is contained in:
parent
8beac86ac9
commit
68ba5df7ea
@ -31,7 +31,7 @@ public class UopModifyMessageReceiveListener {
|
|||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void start() {
|
public void start() {
|
||||||
if (profileJudgeUtil.isSjjtGsxDev()) {
|
if (profileJudgeUtil.isSjjt()) {
|
||||||
if (receiver != null) {
|
if (receiver != null) {
|
||||||
receiver.stop();
|
receiver.stop();
|
||||||
}
|
}
|
||||||
@ -50,7 +50,7 @@ public class UopModifyMessageReceiveListener {
|
|||||||
|
|
||||||
@PreDestroy
|
@PreDestroy
|
||||||
public void end() {
|
public void end() {
|
||||||
if (profileJudgeUtil.isSjjtGsxDev()) {
|
if (profileJudgeUtil.isSjjt()) {
|
||||||
receiver.stop();
|
receiver.stop();
|
||||||
log.info("关闭mq");
|
log.info("关闭mq");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,7 +66,7 @@ public class JwtTokenFilter extends OncePerRequestFilter {
|
|||||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
|
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
|
||||||
if (securityEnable) {
|
if (securityEnable) {
|
||||||
//三江统一认证,3.登录:过滤器判断,回调地址获取code调用获取令牌,首页根据令牌获取登录数据信息
|
//三江统一认证,3.登录:过滤器判断,回调地址获取code调用获取令牌,首页根据令牌获取登录数据信息
|
||||||
if (profileJudgeUtil.isSjjtGsxDev()) {
|
if (profileJudgeUtil.isSjjt()) {
|
||||||
try {
|
try {
|
||||||
validateSjProfile(request, response, filterChain);
|
validateSjProfile(request, response, filterChain);
|
||||||
} catch (InvalidKeySpecException e) {
|
} catch (InvalidKeySpecException e) {
|
||||||
|
|||||||
@ -3,6 +3,9 @@ package com.zhgd.xmgl.util;
|
|||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Component;
|
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 "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