Compare commits
8 Commits
cb79f4cf0f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 1daccbd03b | |||
| a043aa9780 | |||
| 785caaeefc | |||
| 5a684edca6 | |||
| 846498d2df | |||
| 5b325963dc | |||
| cb44f6839f | |||
| f1f5893c99 |
1
Jenkinsfile
vendored
1
Jenkinsfile
vendored
@ -68,7 +68,6 @@ pipeline {
|
|||||||
--name \${CONTAINER_NAME} \
|
--name \${CONTAINER_NAME} \
|
||||||
--network sczx-net \
|
--network sczx-net \
|
||||||
-p 8081:8081 \
|
-p 8081:8081 \
|
||||||
-e SPRING_PROFILES_ACTIVE=test \
|
|
||||||
-e JAVA_OPTS="-Xms256m -Xmx512m -Duser.timezone=Asia/Shanghai" \
|
-e JAVA_OPTS="-Xms256m -Xmx512m -Duser.timezone=Asia/Shanghai" \
|
||||||
-e TZ=Asia/Shanghai \
|
-e TZ=Asia/Shanghai \
|
||||||
-v /etc/localtime:/etc/localtime:ro \
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
|
|||||||
5
pom.xml
5
pom.xml
@ -75,6 +75,11 @@
|
|||||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-validation</artifactId>
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
|
|||||||
58
src/main/java/com/sczx/user/aspect/FacadeAspect.java
Normal file
58
src/main/java/com/sczx/user/aspect/FacadeAspect.java
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
package com.sczx.user.aspect;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.aspectj.lang.JoinPoint;
|
||||||
|
import org.aspectj.lang.ProceedingJoinPoint;
|
||||||
|
import org.aspectj.lang.annotation.Around;
|
||||||
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
|
import org.aspectj.lang.annotation.Before;
|
||||||
|
import org.aspectj.lang.annotation.Pointcut;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author Huang Kai
|
||||||
|
* @Date 2023/1/18 17:01
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Aspect
|
||||||
|
@Component
|
||||||
|
@Slf4j
|
||||||
|
public class FacadeAspect {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 以 controller 包下定义的所有请求为切入点 */
|
||||||
|
@Pointcut("execution(public * com..facade.*.*(..))")
|
||||||
|
public void facadeLog() {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在切点之前织入
|
||||||
|
* @param joinPoint
|
||||||
|
*/
|
||||||
|
@Before("facadeLog()")
|
||||||
|
public void doBefore(JoinPoint joinPoint) {
|
||||||
|
// 打印请求相关参数
|
||||||
|
log.info("=========================remote Start =========================");
|
||||||
|
// 打印 Http method
|
||||||
|
//log.info("HTTP Method : {}", request.getMethod());
|
||||||
|
// 打印调用 controller 的全路径以及执行方法
|
||||||
|
log.info("Class Method:{}.{}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName());
|
||||||
|
// 打印请求的 IP
|
||||||
|
//log.info("IP : {}", request.getRemoteAddr());
|
||||||
|
// 打印请求入参
|
||||||
|
log.info("facadeAspect_Request:{}", JSON.toJSONString(joinPoint.getArgs()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Around("facadeLog()")
|
||||||
|
public Object doAround(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
|
Object result = proceedingJoinPoint.proceed();
|
||||||
|
// 打印出参
|
||||||
|
log.info("facadeAspect_Response:{}", JSON.toJSONString(result));
|
||||||
|
// 执行耗时
|
||||||
|
log.info("Time-Consuming : {} ms", System.currentTimeMillis() - startTime);
|
||||||
|
log.info("=========================remote End =========================");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,6 +4,7 @@ package com.sczx.user.config;
|
|||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Profile;
|
||||||
import springfox.documentation.builders.ApiInfoBuilder;
|
import springfox.documentation.builders.ApiInfoBuilder;
|
||||||
import springfox.documentation.builders.PathSelectors;
|
import springfox.documentation.builders.PathSelectors;
|
||||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||||
@ -14,6 +15,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableSwagger2
|
@EnableSwagger2
|
||||||
|
@Profile("!prod") // 除了prod环境外都启用
|
||||||
public class SwaggerConfig {
|
public class SwaggerConfig {
|
||||||
@Bean
|
@Bean
|
||||||
public Docket createRestApi() {
|
public Docket createRestApi() {
|
||||||
|
|||||||
@ -1,10 +1,7 @@
|
|||||||
package com.sczx.user.controller;
|
package com.sczx.user.controller;
|
||||||
|
|
||||||
import com.sczx.user.common.Result;
|
import com.sczx.user.common.Result;
|
||||||
import com.sczx.user.dto.AlipayMiniProgramRegRequest;
|
import com.sczx.user.dto.*;
|
||||||
import com.sczx.user.dto.AuthRequest;
|
|
||||||
import com.sczx.user.dto.LoginResponse;
|
|
||||||
import com.sczx.user.dto.WxMiniProgramRegRequest;
|
|
||||||
import com.sczx.user.service.IUserService;
|
import com.sczx.user.service.IUserService;
|
||||||
import com.sczx.user.util.JwtUtil;
|
import com.sczx.user.util.JwtUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@ -82,4 +79,10 @@ public class AuthController {
|
|||||||
public Result<LoginResponse> getLoginTokenByMobile(@RequestParam("mobile") String mobile) {;
|
public Result<LoginResponse> getLoginTokenByMobile(@RequestParam("mobile") String mobile) {;
|
||||||
return Result.ok(userService.getLoginTokenByMobile(mobile));
|
return Result.ok(userService.getLoginTokenByMobile(mobile));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "根据手机号获取用户信息", notes = "根据手机号获取用户信息")
|
||||||
|
@GetMapping("/getUInfoByMobile")
|
||||||
|
public Result<SimpleUserInfoDTO> getUInfoByMobile(@RequestParam("mobile") String mobile) {;
|
||||||
|
return Result.ok(userService.getUserInfoByMobile(mobile));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,4 +38,10 @@ public class SimpleUserInfoDTO {
|
|||||||
@ApiModelProperty("是否认证0未认证1已认证")
|
@ApiModelProperty("是否认证0未认证1已认证")
|
||||||
private Integer authed;
|
private Integer authed;
|
||||||
|
|
||||||
|
@ApiModelProperty("身份证号")
|
||||||
|
private String idNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("实名")
|
||||||
|
private String realName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,7 +64,7 @@ public class BaseUserPO implements Serializable {
|
|||||||
@ApiModelProperty("身份证号")
|
@ApiModelProperty("身份证号")
|
||||||
private String idNo;
|
private String idNo;
|
||||||
|
|
||||||
@ApiModelProperty("身份证号")
|
@ApiModelProperty("实名")
|
||||||
private String realName;
|
private String realName;
|
||||||
|
|
||||||
@ApiModelProperty("正面照片")
|
@ApiModelProperty("正面照片")
|
||||||
|
|||||||
@ -76,4 +76,11 @@ public interface IUserService {
|
|||||||
* @return 登录token
|
* @return 登录token
|
||||||
*/
|
*/
|
||||||
LoginResponse getLoginTokenByMobile(String mobile);
|
LoginResponse getLoginTokenByMobile(String mobile);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据手机号获取用户信息
|
||||||
|
* @param mobile
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
SimpleUserInfoDTO getUserInfoByMobile(String mobile);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -175,7 +175,7 @@ public class UserServiceImpl implements IUserService {
|
|||||||
|
|
||||||
//先根据openid查询用户,如果有则直接返回登录信息
|
//先根据openid查询用户,如果有则直接返回登录信息
|
||||||
LambdaQueryWrapper<BaseUserPO> queryByOpenIdWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BaseUserPO> queryByOpenIdWrapper = new LambdaQueryWrapper<>();
|
||||||
queryByOpenIdWrapper.eq(BaseUserPO::getWechatOpenid, openid).last(" limit 1");
|
queryByOpenIdWrapper.eq(BaseUserPO::getWechatOpenid, openid).eq(BaseUserPO::getDelFlag, "0").last(" limit 1");
|
||||||
BaseUserPO baseUserPO = baseUserRepo.getOne(queryByOpenIdWrapper);
|
BaseUserPO baseUserPO = baseUserRepo.getOne(queryByOpenIdWrapper);
|
||||||
if(Objects.nonNull(baseUserPO)){
|
if(Objects.nonNull(baseUserPO)){
|
||||||
return getLoginResponse(baseUserPO,MiniProgramTypeEnum.WECHAT);
|
return getLoginResponse(baseUserPO,MiniProgramTypeEnum.WECHAT);
|
||||||
@ -195,6 +195,7 @@ public class UserServiceImpl implements IUserService {
|
|||||||
boolean isNewUser = false;
|
boolean isNewUser = false;
|
||||||
LambdaQueryWrapper<BaseUserPO> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BaseUserPO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(BaseUserPO::getPhoneNumber, phoneNumber);
|
queryWrapper.eq(BaseUserPO::getPhoneNumber, phoneNumber);
|
||||||
|
queryWrapper.eq(BaseUserPO::getDelFlag, "0");
|
||||||
baseUserPO = baseUserRepo.getOne(queryWrapper);
|
baseUserPO = baseUserRepo.getOne(queryWrapper);
|
||||||
if(Objects.isNull(baseUserPO)){
|
if(Objects.isNull(baseUserPO)){
|
||||||
baseUserPO = new BaseUserPO();
|
baseUserPO = new BaseUserPO();
|
||||||
@ -260,7 +261,7 @@ public class UserServiceImpl implements IUserService {
|
|||||||
|
|
||||||
// 3. 查询用户是否存在
|
// 3. 查询用户是否存在
|
||||||
LambdaQueryWrapper<BaseUserPO> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BaseUserPO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(BaseUserPO::getPhoneNumber, phoneNumber);
|
queryWrapper.eq(BaseUserPO::getPhoneNumber, phoneNumber).eq(BaseUserPO::getDelFlag, "0");
|
||||||
BaseUserPO baseUserPO = baseUserRepo.getOne(queryWrapper);
|
BaseUserPO baseUserPO = baseUserRepo.getOne(queryWrapper);
|
||||||
|
|
||||||
boolean isNewUser = false;
|
boolean isNewUser = false;
|
||||||
@ -319,9 +320,9 @@ public class UserServiceImpl implements IUserService {
|
|||||||
|
|
||||||
LambdaQueryWrapper<BaseUserPO> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BaseUserPO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
if(MiniProgramTypeEnum.WECHAT.getType().equalsIgnoreCase(programType)){
|
if(MiniProgramTypeEnum.WECHAT.getType().equalsIgnoreCase(programType)){
|
||||||
queryWrapper.eq(BaseUserPO::getWechatOpenid, programId).last(" limit 1");
|
queryWrapper.eq(BaseUserPO::getWechatOpenid, programId).eq(BaseUserPO::getDelFlag, "0").last(" limit 1");
|
||||||
}else {
|
}else {
|
||||||
queryWrapper.eq(BaseUserPO::getAlipayUserid, programId).last(" limit 1");
|
queryWrapper.eq(BaseUserPO::getAlipayUserid, programId).eq(BaseUserPO::getDelFlag, "0").last(" limit 1");
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseUserPO baseUserPO = baseUserRepo.getOne(queryWrapper);
|
BaseUserPO baseUserPO = baseUserRepo.getOne(queryWrapper);
|
||||||
@ -343,6 +344,10 @@ public class UserServiceImpl implements IUserService {
|
|||||||
updateWrapper.set(BaseUserPO::getBackPhoto, authRequest.getBackPhoto());
|
updateWrapper.set(BaseUserPO::getBackPhoto, authRequest.getBackPhoto());
|
||||||
updateWrapper.set(BaseUserPO::getAuthed, 1);
|
updateWrapper.set(BaseUserPO::getAuthed, 1);
|
||||||
baseUserRepo.update(updateWrapper);
|
baseUserRepo.update(updateWrapper);
|
||||||
|
// 推送用户ID
|
||||||
|
ThreadPoolUtils.getThreadPool().execute(() -> {
|
||||||
|
syncInteg.sendUserInfoToBattery(authRequest.getUserId().toString());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -353,6 +358,14 @@ public class UserServiceImpl implements IUserService {
|
|||||||
return getLoginResponse(baseUserPO,MiniProgramTypeEnum.WECHAT);
|
return getLoginResponse(baseUserPO,MiniProgramTypeEnum.WECHAT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SimpleUserInfoDTO getUserInfoByMobile(String mobile) {
|
||||||
|
LambdaQueryWrapper<BaseUserPO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(BaseUserPO::getPhoneNumber, mobile).last( " limit 1");
|
||||||
|
BaseUserPO baseUserPO = baseUserRepo.getOne(queryWrapper);
|
||||||
|
return UserInfoConvert.INSTANCE.poToSimpleDTO(baseUserPO);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取登录信息
|
* 获取登录信息
|
||||||
* @param programId
|
* @param programId
|
||||||
@ -380,6 +393,9 @@ public class UserServiceImpl implements IUserService {
|
|||||||
*/
|
*/
|
||||||
private LoginResponse getLoginResponse(BaseUserPO baseUserPO,MiniProgramTypeEnum miniProgramTypeEnum) {
|
private LoginResponse getLoginResponse(BaseUserPO baseUserPO,MiniProgramTypeEnum miniProgramTypeEnum) {
|
||||||
SimpleUserInfoDTO simpleUserInfoDTO = UserInfoConvert.INSTANCE.poToSimpleDTO(baseUserPO);
|
SimpleUserInfoDTO simpleUserInfoDTO = UserInfoConvert.INSTANCE.poToSimpleDTO(baseUserPO);
|
||||||
|
if(StringUtils.isNotBlank(baseUserPO.getRealName())){
|
||||||
|
simpleUserInfoDTO.setUserName(baseUserPO.getRealName());
|
||||||
|
}
|
||||||
if(Objects.isNull(simpleUserInfoDTO)){
|
if(Objects.isNull(simpleUserInfoDTO)){
|
||||||
throw new BizException(ApiErrorCode.NO_REG);
|
throw new BizException(ApiErrorCode.NO_REG);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
package com.sczx.user.thirdpart.integration;
|
package com.sczx.user.thirdpart.integration;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alipay.api.AlipayApiException;
|
import com.alipay.api.AlipayApiException;
|
||||||
import com.alipay.api.AlipayClient;
|
import com.alipay.api.AlipayClient;
|
||||||
@ -148,7 +149,7 @@ public class AlipayInteg {
|
|||||||
tokenRequest.setCode(authCode);
|
tokenRequest.setCode(authCode);
|
||||||
log.info("获取支付宝access_token请求参数: {}", tokenRequest);
|
log.info("获取支付宝access_token请求参数: {}", tokenRequest);
|
||||||
AlipaySystemOauthTokenResponse tokenResponse = alipayClient.certificateExecute(tokenRequest);
|
AlipaySystemOauthTokenResponse tokenResponse = alipayClient.certificateExecute(tokenRequest);
|
||||||
log.info("获取支付宝access_token返回结果: {}", tokenResponse.getBody());
|
log.info("获取支付宝access_token返回结果: {}", JSON.toJSONString(tokenResponse));
|
||||||
|
|
||||||
if (!tokenResponse.isSuccess()) {
|
if (!tokenResponse.isSuccess()) {
|
||||||
log.error("获取支付宝access_token失败: {}", tokenResponse.getSubMsg());
|
log.error("获取支付宝access_token失败: {}", tokenResponse.getSubMsg());
|
||||||
|
|||||||
@ -1,33 +1,4 @@
|
|||||||
#本地开发
|
#本地开发
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
discovery:
|
|
||||||
server-addr: 115.190.8.52:8848 # Nacos 地址
|
|
||||||
group: DEFAULT_GROUP
|
|
||||||
metadata:
|
|
||||||
version: 1.0.0
|
|
||||||
env: dev
|
|
||||||
|
|
||||||
datasource:
|
|
||||||
url: jdbc:mysql://115.190.8.52:3306/sczx?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
|
||||||
username: sczx_user
|
|
||||||
password: Sczx123@
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
hikari:
|
|
||||||
maximum-pool-size: 10
|
|
||||||
auto-commit: true
|
|
||||||
redis:
|
|
||||||
host: 115.190.8.52
|
|
||||||
port: 6379
|
|
||||||
lettuce:
|
|
||||||
pool:
|
|
||||||
max-active: 8
|
|
||||||
max-wait: 2000ms
|
|
||||||
max-idle: 4
|
|
||||||
min-idle: 1
|
|
||||||
max-life-time: 300000ms
|
|
||||||
|
|
||||||
sczx-sync:
|
sczx-sync:
|
||||||
ribbon:
|
ribbon:
|
||||||
listOfServers: http://115.190.8.52:8016
|
listOfServers: http://115.190.8.52:8016
|
||||||
@ -1,33 +1 @@
|
|||||||
#远程测试部署
|
#远程测试部署
|
||||||
spring:
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
discovery:
|
|
||||||
server-addr: 115.190.8.52:8848 # Nacos 地址
|
|
||||||
group: DEFAULT_GROUP
|
|
||||||
metadata:
|
|
||||||
version: 1.0.0
|
|
||||||
env: dev
|
|
||||||
datasource:
|
|
||||||
url: jdbc:mysql://115.190.8.52:3306/sczx?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
|
||||||
username: sczx_user
|
|
||||||
password: Sczx123@
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
hikari:
|
|
||||||
maximum-pool-size: 20 # 最大连接数
|
|
||||||
minimum-idle: 5 # 最小空闲连接数
|
|
||||||
connection-timeout: 30000 # 连接超时时间(毫秒)
|
|
||||||
idle-timeout: 600000 # 空闲连接超时时间(毫秒)
|
|
||||||
max-lifetime: 1800000 # 连接最大存活时间(毫秒)
|
|
||||||
leak-detection-threshold: 60000 # 连接泄漏检测阈值(毫秒)
|
|
||||||
auto-commit: true
|
|
||||||
redis:
|
|
||||||
host: 115.190.8.52
|
|
||||||
port: 6379
|
|
||||||
lettuce:
|
|
||||||
pool:
|
|
||||||
max-active: 8
|
|
||||||
max-wait: 2000ms
|
|
||||||
max-idle: 4
|
|
||||||
min-idle: 1
|
|
||||||
max-life-time: 300000ms
|
|
||||||
@ -1,57 +1,7 @@
|
|||||||
|
|
||||||
server:
|
|
||||||
port: 8081
|
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: sczx-user # 微服务名称
|
name: sczx-user # 微服务名称
|
||||||
http:
|
|
||||||
encoding:
|
|
||||||
charset: UTF-8
|
|
||||||
enabled: true
|
|
||||||
force: true
|
|
||||||
mvc:
|
|
||||||
async:
|
|
||||||
request-timeout: -1
|
|
||||||
#
|
|
||||||
# cloud:
|
|
||||||
# nacos:
|
|
||||||
# discovery:
|
|
||||||
# server-addr: 115.190.8.52:8848 # Nacos 地址
|
|
||||||
# group: DEFAULT_GROUP
|
|
||||||
# metadata:
|
|
||||||
# version: 1.0.0
|
|
||||||
# env: dev
|
|
||||||
|
|
||||||
|
|
||||||
lifecycle:
|
|
||||||
timeout-per-shutdown-phase: 30s # 设置优雅停机时间
|
|
||||||
|
|
||||||
management:
|
|
||||||
endpoints:
|
|
||||||
web:
|
|
||||||
exposure:
|
|
||||||
include: "*" # 暴露所有监控端点
|
|
||||||
endpoint:
|
|
||||||
health:
|
|
||||||
show-details: always
|
|
||||||
|
|
||||||
feign:
|
|
||||||
client:
|
|
||||||
config:
|
|
||||||
default:
|
|
||||||
connectTimeout: 5000
|
|
||||||
readTimeout: 5000
|
|
||||||
hystrix:
|
|
||||||
enabled: true # 启用 Feign 的 Hystrix 支持
|
|
||||||
|
|
||||||
hystrix:
|
|
||||||
command:
|
|
||||||
default:
|
|
||||||
execution:
|
|
||||||
isolation:
|
|
||||||
thread:
|
|
||||||
timeoutInMilliseconds: 10000 # 默认熔断超时时间
|
|
||||||
|
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
mapper-locations: classpath*:mapper/**/*.xml
|
mapper-locations: classpath*:mapper/**/*.xml
|
||||||
@ -60,31 +10,5 @@ mybatis-plus:
|
|||||||
mapUnderscoreToCamelCase: true
|
mapUnderscoreToCamelCase: true
|
||||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 控制台打印 SQL(调试用)
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 控制台打印 SQL(调试用)
|
||||||
|
|
||||||
auth:
|
|
||||||
secret-key: his-is-a-very-long-and-secure-secret-key-for-jwt-signing-please-dont-use-short-keys
|
|
||||||
token-expiration: 86400000 # 24小时
|
|
||||||
|
|
||||||
wechat:
|
|
||||||
miniapp:
|
|
||||||
apiurl: https://api.weixin.qq.com
|
|
||||||
appid: wx25e1ad1a70c326de
|
|
||||||
secret: e0633b08d915a844f7ae7e4495d9e854
|
|
||||||
grantType: authorization_code
|
|
||||||
|
|
||||||
alipay:
|
|
||||||
miniapp:
|
|
||||||
appid: 2021005174658269
|
|
||||||
privateKey: MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCQke+mZsxNXJXMn2iUZRkhITWY9qPczwHMgRxl68JRuNzZE2AXhAc2ciF7EGob1y0al4hvJo5JUrDew9Zkv0BocAsPjLma3A9KFgj131xMuLxVvHtktkNSwwW9VIbOOhFAQAy3J9jt8PdEk40UONyu9J5Shjs6jbQ8RogdDuwuzKpNj0ZOTeUqgR6RME4xZ0VqvZe9XhVfq3QtVGttUzOpLPNg6boBy/5RqwC64lVFICMqjKkMW2NklVPBDFO46QwfWEbaA+APnd9bd+9WadyNySPb7kAK8GOlvZYfysy+QkOQdj/oebKWKzdKXpFnF+n52dYzeGTvckt1suDngwAFAgMBAAECggEAcPc39iTZe5HfE9d0FpCxBCw4/1+qRz4SP8SbdiC05Lq5B36WVYm7QRYJh2oaH8sR2XeTCpdsE2tj/Y21l1/Calkyq2HhHlraL5/sPIPeUa0ArVXsbZPmI2N0tq6376l8FWJ3DR876SGjdZh+YtDT0HogxIdS/LwBnB/Y+CvS7fWcqiMjcR4h28RU70CQqxpzYuPfqG6GZmByGyJAcdlhFAYgiksb+qZnkjoaKHsjb61xfUX4z+HGdQLqOlVKfNqIpiO7arXaeAb0RQiB8Lqi7fBvn8LLhlTmM1Hr4gyQO14lJmP5Vp2BIg9m5AC9vRkpZ9l79bUTIepDe9+Ovcx5eQKBgQDWZ5yoz8q8Z5VIfMSVTHO3wpfwOBM92S2c21hTsds7NezsMVqGcTuAcvbMW2i1MwxtS7kahXraRAxZnCDB9ZVJs+88xcgu5QJWZ1rJyrwEwB2gTQhColv+XZW6Ck/J6kk2/PG26rNQG6pg/xrKaMtPnXXyKCsdQTyEpr+mlNIJ2wKBgQCsnf4lIuwftCSm0jI73tO1Bb4U9TCIapKidnIhutbyg6u+hJMUTVDNkjsBnrTN24sSP7Cu4Zs/W4lkDqq86fHNEvnF+FouIfO/CwaGteDBNwXHSLM0D+zEBbK04bfoYi7lYZeDRPygFrM49Sxkp0MAmItDmXqbYRQBlhN1XVzznwKBgQCQ+72fFex1XOJBA0X345v4rlkKMxEn6J2EjXr8FbA3KO8OhQ0/DoD7CkLDzChRJ7UGj4cbXRnHUO69BevM3SHXlhp4ERKeS3Q6M2fcPwDHgZZHGPA2Bw6IQoaGKITt+EUMLx3Q4ILi7+JV9wwJxbV+H+9rEiidfsjKtuuwXMBvswKBgQChpElrCSrH/W8c8FSuD9l7+GapRXkvJW0uyW/S+h1yd66J96erKUNzXW339GAnLWErs4yGFynDyLn9gmaMBR6zBQP0SL5Z2N1hlreDyikvhZDZrtBw/kCexx8zlvMan2Z+0kaJXD6cwuUNfzkVADQUCMTQhpZzjhKn8ZtDGiyCzQKBgQCAhU0khG/ufZfQ089+1G7PAlErBr5MQaG40a2vfIWGtHkYyXq5N/3jow1bd2qsyLuz8mr2sWQeURK+B2xZridf6JtYz3gB+dLw0frlLKk4Q6jeehiRlE8H8tIYe/7KcgTmdIzEbo3lmyGMFAILvr/pSCWeUehQYR9PH91Qyi+Tog==
|
|
||||||
# publicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArPG4JQ9YY9+tOeImQO0eNkp+NZkenJ9hMHEVVmwAHAI5BoJMCLvAm504BXSpgpqaiCJ6ARTwBkiDz4dyCMVfE3VE8+oMFtXqfHaZLhfd+X9VQNqRCz0HeR2IbjGnnbYxQOAEOM6z092UfNieG00HyU5yREfzjJkIcyuGeGgbIBG1gPpLhXsQKRhQYqp4Exgd4LX6qnKLPL90kJVkQnHcJkp+rCoQ5zS6ZUXE2d/2GzY7xi93uTU2CLMiZ7Vi2OZ1g7xY+yDQzTA/CseveJeW3rM6T8yBjlEJwsywEL5co3YqpJUIMIe/fLjhRRgj+JUq5w0sRqb3+CswQHIjgc71QwIDAQAB
|
|
||||||
appCertPath: /app/ali/cert/appCertPublicKey_2021005174658269.crt
|
|
||||||
alipayCertPath: /app/ali/cert/alipayCertPublicKey_RSA2.crt
|
|
||||||
alipayRootCertPath: /app/ali/cert/alipayRootCert.crt
|
|
||||||
gatewayUrl: https://openapi.alipay.com/gateway.do
|
|
||||||
decryptKey: +MXY7LF6TPih7jf7AmtC2g==
|
|
||||||
format: JSON
|
|
||||||
charset: UTF-8
|
|
||||||
signType: RSA2
|
|
||||||
encryptType: AES
|
|
||||||
|
|
||||||
dataPush:
|
dataPush:
|
||||||
sendAddUserUrl: http://115.190.8.52:8016/send/userinfo/
|
sendAddUserUrl: http://115.190.8.52:8016/send/userinfo/
|
||||||
15
src/main/resources/bootstrap.yml
Normal file
15
src/main/resources/bootstrap.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: sczx-user # 应用名称,对应 Nacos 配置的 dataId
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
server-addr: 115.190.8.52:8848 # Nacos 服务器地址
|
||||||
|
config:
|
||||||
|
group: DEFAULT_GROUP # 配置分组
|
||||||
|
file-extension: yaml # 配置文件格式
|
||||||
|
timeout: 5000 # 配置读取超时时间
|
||||||
|
# 添加共享配置
|
||||||
|
shared-configs:
|
||||||
|
- data-id: shared-config.yaml
|
||||||
|
group: DEFAULT_GROUP
|
||||||
|
refresh: true # 是否支持动态刷新
|
||||||
Reference in New Issue
Block a user