update jie-enbale and jia-enbale naming sytle

This commit is contained in:
weiweiw 2024-07-05 09:29:51 +08:00
parent 3179cc57ee
commit 5c12febe6e
10 changed files with 14 additions and 14 deletions

View File

@ -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 ) {

View File

@ -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";

View File

@ -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);

View File

@ -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)

View File

@ -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";
/**

View File

@ -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;
/**
* 返回的数据 是否加密

View File

@ -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

View File

@ -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;

View File

@ -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)

View File

@ -50,8 +50,8 @@ spring:
#系统 自动 加解密开关
system:
jia-enable: false
jie-enable: true
encryptEnabled: false
decryptEnabled: true
#加密组件
jasypt:
encryptor: