🎨 改进结构和代码格式,删除无用引入等

This commit is contained in:
冷冷 committed 2019-01-31 14:10:39 +08:00
1 parent bebd701981
commit 07fa29e4c6
8 files changed
+6 -11

No files matched your search

@@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.extension.plugins.tenant.TenantSqlParser;
import com.pig4cloud.pigx.common.data.datascope.DataScopeInterceptor;
import com.pig4cloud.pigx.common.data.tenant.PigxTenantHandler;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -38,6 +39,7 @@ import java.util.List;
* @date 2017/10/29
*/
@Configuration
@ConditionalOnClass(MybatisPlusConfig.class)
@MapperScan("com.pig4cloud.pigx.*.mapper")
public class MybatisPlusConfig {
@@ -17,7 +17,6 @@
package com.pig4cloud.pigx.common.data.tenant;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.tenant.TenantHandler;
import lombok.extern.slf4j.Slf4j;
import net.sf.jsqlparser.expression.Expression;
@@ -36,7 +36,7 @@ public class TenantContextHolder {
*
* @param tenantId
*/
public void setTenantId(Integer tenantId) {
void setTenantId(Integer tenantId) {
THREAD_LOCAL_TENANT.set(tenantId);
}
@@ -24,8 +24,6 @@ import com.pig4cloud.pigx.common.core.constant.CommonConstants;
import com.pig4cloud.pigx.common.security.exception.PigxAuth2Exception;
import lombok.SneakyThrows;
import java.io.IOException;
/**
* @author lengleng
* @date 2018/11/16
@@ -31,7 +31,6 @@ import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
/**
@@ -25,7 +25,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpHeaders;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
/**
* @author lengleng
@@ -25,8 +25,6 @@ import org.springframework.http.client.ClientHttpRequestExecution;
import org.springframework.http.client.ClientHttpRequestInterceptor;
import org.springframework.http.client.ClientHttpResponse;
import java.io.IOException;
/**
*@author LCN on 2017/7/3.
*
@@ -35,10 +35,10 @@ import org.springframework.stereotype.Component;
import org.springframework.web.util.UriComponentsBuilder;
import reactor.core.publisher.Mono;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.Map;
/**
@@ -59,8 +59,8 @@ public class PasswordDecoderFilter extends AbstractGatewayFilterFactory {
AES aes = new AES(Mode.CBC,Padding.NoPadding,
new SecretKeySpec(pass.getBytes(), KEY_ALGORITHM),
new IvParameterSpec(pass.getBytes()));
byte[] result = aes.decrypt(Base64.decode(data.getBytes(CharsetUtil.UTF_8)));
return new String(result, CharsetUtil.UTF_8);
byte[] result = aes.decrypt(Base64.decode(data.getBytes(StandardCharsets.UTF_8)));
return new String(result, StandardCharsets.UTF_8);
}
@Override