mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 04:39:00 +08:00
♻️ 重构代码。
This commit is contained in:
1 parent
d79f000ce1
commit
9e6ca907bb
14 files changed
+20
-95
No files matched your search
@@ -20,4 +20,4 @@ eureka:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@localhost:1025/eureka/
|
||||
defaultZone: http://pig:pig@pigx-eureka:1025/eureka/
|
||||
+3
@@ -26,6 +26,9 @@ package com.pig4cloud.pigx.common.core.exception;
|
||||
public class ValidateCodeException extends Exception {
|
||||
private static final long serialVersionUID = -7285211528095468156L;
|
||||
|
||||
public ValidateCodeException() {
|
||||
}
|
||||
|
||||
public ValidateCodeException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ eureka:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@localhost:1025/eureka/
|
||||
defaultZone: http://pig:pig@pigx-eureka:1025/eureka/
|
||||
|
||||
# 暴露监控端点
|
||||
management:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
spring:
|
||||
redis:
|
||||
password:
|
||||
host: localhost
|
||||
host: pigx-redis
|
||||
# 暴露监控端点
|
||||
management:
|
||||
endpoints:
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
security:
|
||||
oauth2:
|
||||
client:
|
||||
client-id: pig
|
||||
client-secret: pig
|
||||
client-id: pigx
|
||||
client-secret: pigx
|
||||
scope: server
|
||||
resource:
|
||||
token-info-uri: http://localhost:9999/auth/oauth/check_token
|
||||
token-info-uri: http://pigx-gateway:9999/auth/oauth/check_token
|
||||
|
||||
# 数据源
|
||||
spring:
|
||||
|
||||
@@ -8,21 +8,15 @@ spring:
|
||||
password: pig
|
||||
application:
|
||||
name: pigx-eureka
|
||||
boot:
|
||||
admin:
|
||||
client:
|
||||
url: http://localhost:5001
|
||||
instance:
|
||||
name: PIGX-EUREKA
|
||||
|
||||
# docker-compose部署时候 hostname 换成pigx-eureka
|
||||
# 类似的 redis 使用pigx-redis ,gateway 换成 pigx-gateway
|
||||
eureka:
|
||||
instance:
|
||||
hostname: localhost
|
||||
hostname: pigx-eureka
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
register-with-eureka: false
|
||||
register-with-eureka: true
|
||||
fetch-registry: false
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@${eureka.instance.hostname}:${server.port}/eureka/
|
||||
|
||||
@@ -56,9 +56,9 @@
|
||||
</dependency>
|
||||
<!--hutool-->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>${hutool.version}</version>
|
||||
<groupId>com.pig4cloud</groupId>
|
||||
<artifactId>pigx-common-core</artifactId>
|
||||
<version>${pigx.version}</version>
|
||||
</dependency>
|
||||
<!--接口文档-->
|
||||
<dependency>
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2025, lengleng All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the pig4cloud.com developer nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
* Author: lengleng (wangiegie@gmail.com)
|
||||
*/
|
||||
|
||||
package com.pig4cloud.pigx.gateway.exception;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2018年07月22日
|
||||
* 异常包装类
|
||||
*/
|
||||
public class CheckedException extends Exception {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public CheckedException() {
|
||||
}
|
||||
|
||||
public CheckedException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public CheckedException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public CheckedException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public CheckedException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
|
||||
super(message, cause, enableSuppression, writableStackTrace);
|
||||
}
|
||||
}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2025, lengleng All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the pig4cloud.com developer nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
* Author: lengleng (wangiegie@gmail.com)
|
||||
*/
|
||||
|
||||
package com.pig4cloud.pigx.gateway.exception;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
*/
|
||||
public class ValidateCodeException extends Exception {
|
||||
|
||||
}
|
||||
+2
-2
@@ -20,9 +20,9 @@ package com.pig4cloud.pigx.gateway.filter;
|
||||
import cn.hutool.core.codec.Base64;
|
||||
import cn.hutool.core.util.CharsetUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.pig4cloud.pigx.common.core.exception.CheckedException;
|
||||
import com.pig4cloud.pigx.common.core.exception.ValidateCodeException;
|
||||
import com.pig4cloud.pigx.gateway.config.FilterIgnorePropertiesConfig;
|
||||
import com.pig4cloud.pigx.gateway.exception.CheckedException;
|
||||
import com.pig4cloud.pigx.gateway.exception.ValidateCodeException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cloud.gateway.filter.GatewayFilter;
|
||||
|
||||
@@ -22,6 +22,6 @@ eureka:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@localhost:1025/eureka/
|
||||
defaultZone: http://pig:pig@pigx-eureka:1025/eureka/
|
||||
|
||||
|
||||
@@ -23,4 +23,4 @@ eureka:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@localhost:1025/eureka/
|
||||
defaultZone: http://pig:pig@pigx-eureka:1025/eureka/
|
||||
@@ -20,4 +20,4 @@ eureka:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@localhost:1025/eureka/
|
||||
defaultZone: http://pig:pig@pigx-eureka:1025/eureka/
|
||||
@@ -20,4 +20,4 @@ eureka:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@localhost:1025/eureka/
|
||||
defaultZone: http://pig:pig@pigx-eureka:1025/eureka/
|
||||
Reference in new issue
Block a user