update jie-enbale and jia-enbale naming sytle
This commit is contained in:
parent
3179cc57ee
commit
5c12febe6e
|
|
@ -25,10 +25,10 @@ public class BonusGatewayApplication implements CommandLineRunner {
|
|||
private StringEncryptor encryptor;
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
String nacos = encrypt("Jjsp@nacos2023" );
|
||||
String mogodb = encrypt("Bonus@admin123!" );
|
||||
System.err.println( "nacos原始明文密码加密后的结果为:" + nacos );
|
||||
System.err.println( "mogodb原始明文密码加密后的结果为:" + mogodb );
|
||||
// String nacos = encrypt("Jjsp@nacos2023" );
|
||||
// String mogodb = encrypt("Bonus@admin123!" );
|
||||
// System.err.println( "nacos原始明文密码加密后的结果为:" + nacos );
|
||||
// System.err.println( "mogodb原始明文密码加密后的结果为:" + mogodb );
|
||||
}
|
||||
|
||||
private String encrypt( String originPassord ) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import static org.springframework.http.MediaType.MULTIPART_FORM_DATA_VALUE;
|
|||
@Component
|
||||
public class AecDecryptParamFilter extends AbstractGatewayFilterFactory {
|
||||
|
||||
@Value("${system.jie-enable}")
|
||||
@Value("${system.decryptEnabled}")
|
||||
public boolean jaData;
|
||||
|
||||
public final static String HEARD_NAME="decrypt";
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import java.util.concurrent.TimeUnit;
|
|||
public class AuthFilter implements GlobalFilter, Ordered
|
||||
{
|
||||
|
||||
@Value("${system.jie-enable}")
|
||||
@Value("${system.decryptEnabled}")
|
||||
public boolean jaData;
|
||||
private static final Logger log = LoggerFactory.getLogger(AuthFilter.class);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import com.bonus.common.core.utils.ServletUtils;
|
|||
@Component
|
||||
public class BlackListUrlFilter extends AbstractGatewayFilterFactory<BlackListUrlFilter.Config>
|
||||
{
|
||||
@Value("${system.jie-enable}")
|
||||
@Value("${system.decryptEnabled}")
|
||||
public boolean jaData;
|
||||
@Override
|
||||
public GatewayFilter apply(Config config)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ import java.util.Map;
|
|||
@Slf4j
|
||||
public class RequestCoverFilter implements GlobalFilter, Ordered {
|
||||
|
||||
@Value("${system.jie-enable}")
|
||||
@Value("${system.decryptEnabled}")
|
||||
public boolean jaData;
|
||||
public final static String APPLICATION_JSON_UTF8="application/json;charset=UTF-8";
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import static org.springframework.http.MediaType.MULTIPART_FORM_DATA_VALUE;
|
|||
@Slf4j
|
||||
public class ResponseEncryptFilter implements GlobalFilter, Ordered {
|
||||
|
||||
@Value("${system.jia-enable}")
|
||||
@Value("${system.encryptEnabled}")
|
||||
public boolean jaData;
|
||||
/**
|
||||
* 返回的数据 是否加密
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class ValidateCodeFilter extends AbstractGatewayFilterFactory<Object>
|
|||
{
|
||||
private final static String[] VALIDATE_URL = new String[] { "/auth/login", "/auth/register" };
|
||||
|
||||
@Value("${system.jie-enable}")
|
||||
@Value("${system.decryptEnabled}")
|
||||
public boolean jaData;
|
||||
|
||||
@Autowired
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import reactor.core.publisher.Mono;
|
|||
@Configuration
|
||||
public class GatewayExceptionHandler implements ErrorWebExceptionHandler
|
||||
{
|
||||
@Value("${system.jie-enable}")
|
||||
@Value("${system.decryptEnabled}")
|
||||
public boolean jaData;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import reactor.core.publisher.Mono;
|
|||
*/
|
||||
public class SentinelFallbackHandler implements WebExceptionHandler
|
||||
{
|
||||
@Value("${system.jie-enable}")
|
||||
@Value("${system.decryptEnabled}")
|
||||
public boolean jaData;
|
||||
|
||||
private Mono<Void> writeResponse(ServerResponse response, ServerWebExchange exchange)
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ spring:
|
|||
|
||||
#系统 自动 加解密开关
|
||||
system:
|
||||
jia-enable: false
|
||||
jie-enable: true
|
||||
encryptEnabled: false
|
||||
decryptEnabled: true
|
||||
#加密组件
|
||||
jasypt:
|
||||
encryptor:
|
||||
|
|
|
|||
Loading…
Reference in New Issue