Conflicts: .idea/.gitignore .idea/compiler.xml .idea/encodings.xml .idea/jarRepositories.xml .idea/misc.xml logs/error.log logs/info.logmaster
@@ -0,0 +1,16 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | |||||
<project version="4"> | |||||
<component name="CheckStyle-IDEA" serialisationVersion="2"> | |||||
<checkstyleVersion>10.5.0</checkstyleVersion> | |||||
<scanScope>JavaOnly</scanScope> | |||||
<copyLibs>true</copyLibs> | |||||
<option name="thirdPartyClasspath" /> | |||||
<option name="activeLocationIds" /> | |||||
<option name="locations"> | |||||
<list> | |||||
<ConfigurationLocation id="bundled-sun-checks" type="BUNDLED" scope="All" description="Sun Checks">(bundled)</ConfigurationLocation> | |||||
<ConfigurationLocation id="bundled-google-checks" type="BUNDLED" scope="All" description="Google Checks">(bundled)</ConfigurationLocation> | |||||
</list> | |||||
</option> | |||||
</component> | |||||
</project> |
@@ -0,0 +1,12 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | |||||
<project version="4"> | |||||
<component name="EclipseCodeFormatterProjectSettings"> | |||||
<option name="projectSpecificProfile"> | |||||
<ProjectSpecificProfile> | |||||
<option name="formatter" value="ECLIPSE" /> | |||||
<option name="pathToConfigFileJava" value="D:/soft/formatter/eclipse-codestyle.xml" /> | |||||
<option name="selectedJavaProfile" value="P3C-CodeStyle" /> | |||||
</ProjectSpecificProfile> | |||||
</option> | |||||
</component> | |||||
</project> |
@@ -0,0 +1,36 @@ | |||||
package com.ningdatech.kqapi.sso.controller; | |||||
import com.ningdatech.kqapi.sso.manage.SsoManage; | |||||
import com.ningdatech.kqapi.sso.model.dto.ReqSsoDTO; | |||||
import com.ningdatech.kqapi.sso.model.vo.SsoTokenVO; | |||||
import com.ningdatech.kqapi.sso.model.vo.SsoUserInfoVO; | |||||
import lombok.RequiredArgsConstructor; | |||||
import lombok.extern.slf4j.Slf4j; | |||||
import org.springframework.validation.annotation.Validated; | |||||
import org.springframework.web.bind.annotation.*; | |||||
import javax.validation.Valid; | |||||
/** | |||||
* @author CMM | |||||
* @since 2024/04/07 11:15 | |||||
*/ | |||||
@Slf4j | |||||
@Validated | |||||
@RestController | |||||
@RequestMapping("/api/v1/sso/") | |||||
@RequiredArgsConstructor | |||||
public class SsoController { | |||||
private final SsoManage ssoManage; | |||||
@PostMapping ("/token") | |||||
public SsoTokenVO getToken(@Valid @RequestBody ReqSsoDTO reqSsoDTO) { | |||||
return ssoManage.getToken(reqSsoDTO); | |||||
} | |||||
@PostMapping ("/getUserInfo") | |||||
public SsoUserInfoVO getUserInfo(@Valid @RequestBody ReqSsoDTO reqSsoDTO) { | |||||
return ssoManage.getUserInfo(reqSsoDTO); | |||||
} | |||||
} |
@@ -0,0 +1,88 @@ | |||||
package com.ningdatech.kqapi.sso.manage; | |||||
import java.util.Map; | |||||
import org.apache.commons.lang3.StringUtils; | |||||
import org.springframework.beans.factory.annotation.Value; | |||||
import org.springframework.http.HttpEntity; | |||||
import org.springframework.stereotype.Component; | |||||
import org.springframework.util.MultiValueMap; | |||||
import org.springframework.web.client.RestTemplate; | |||||
import com.ningdatech.kqapi.common.exception.BizException; | |||||
import com.ningdatech.kqapi.sso.model.dto.ReqSsoDTO; | |||||
import com.ningdatech.kqapi.sso.model.vo.SsoTokenVO; | |||||
import com.ningdatech.kqapi.sso.model.vo.SsoUserInfoVO; | |||||
import com.ningdatech.kqapi.sso.utils.HmacAuthUtil; | |||||
import lombok.RequiredArgsConstructor; | |||||
import lombok.extern.slf4j.Slf4j; | |||||
/** | |||||
* @author CMM | |||||
* @since 2024/04/07 11:17 | |||||
*/ | |||||
@Component | |||||
@Slf4j | |||||
@RequiredArgsConstructor | |||||
public class SsoManage { | |||||
@Value("${sso.token.internet-url}") | |||||
//@Value("${sso.token.zww-url}") | |||||
private String tokenUrl; | |||||
@Value("${sso.user-info.internet-url}") | |||||
//@Value("${sso.user-info.zww-url}") | |||||
private String userInfoUrl; | |||||
@Value("${sso.access-key}") | |||||
private String accessKey; | |||||
@Value("${sso.secret-key}") | |||||
private String secretKey; | |||||
@Value("${sso.app-id}") | |||||
private String appId; | |||||
private final RestTemplate restTemplate; | |||||
/** | |||||
* 基于单点登录票据换取请求 token | |||||
* | |||||
* @param reqSsoDTO \ | |||||
* @return SsoTokenVO | |||||
*/ | |||||
public SsoTokenVO getToken(ReqSsoDTO reqSsoDTO) { | |||||
String ticketId = reqSsoDTO.getTicketId(); | |||||
if (StringUtils.isBlank(ticketId)){ | |||||
throw new BizException("登录票据不能为空!"); | |||||
} | |||||
Map<String, String> header = HmacAuthUtil.generateHeader(tokenUrl, "POST", accessKey, secretKey); | |||||
MultiValueMap<String, String> multiValueMap = HmacAuthUtil.convertToMultiValueMap(header); | |||||
reqSsoDTO.setAppId(appId); | |||||
HttpEntity<Object> httpEntity = new HttpEntity<>(reqSsoDTO, multiValueMap); | |||||
SsoTokenVO res = restTemplate.postForObject(tokenUrl, httpEntity, SsoTokenVO.class); | |||||
log.info("[RestTemplateTest-基于单点登录票据换取请求token] http request :{}", res); | |||||
return res; | |||||
} | |||||
/** | |||||
* 基于 token 获取用户信息 | |||||
* | |||||
* @param reqSsoDTO \ | |||||
* @return SsoUserInfoVO | |||||
*/ | |||||
public SsoUserInfoVO getUserInfo(ReqSsoDTO reqSsoDTO) { | |||||
String token = reqSsoDTO.getToken(); | |||||
if (StringUtils.isBlank(token)){ | |||||
throw new BizException("token不能为空!"); | |||||
} | |||||
Map<String, String> header = HmacAuthUtil.generateHeader(userInfoUrl, "POST", accessKey, secretKey); | |||||
MultiValueMap<String, String> multiValueMap = HmacAuthUtil.convertToMultiValueMap(header); | |||||
HttpEntity<Object> httpEntity = new HttpEntity<>(reqSsoDTO,multiValueMap); | |||||
SsoUserInfoVO res = restTemplate.postForObject(userInfoUrl, httpEntity, SsoUserInfoVO.class); | |||||
log.info("[RestTemplateTest-基于token获取用户信息] http request :{}", res); | |||||
return res; | |||||
} | |||||
} |
@@ -0,0 +1,25 @@ | |||||
package com.ningdatech.kqapi.sso.model.dto; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
/** | |||||
* @author CMM | |||||
* @since 2024/04/07 11:22 | |||||
*/ | |||||
@Data | |||||
@ApiModel(value = "ReqTokenDTO", description = "获取Token请求实体") | |||||
public class ReqSsoDTO { | |||||
@ApiModelProperty("单点登录票据") | |||||
private String ticketId; | |||||
@ApiModelProperty("应用发布 ID") | |||||
private String appId; | |||||
@ApiModelProperty("单点登录Token") | |||||
private String token; | |||||
} |
@@ -0,0 +1,29 @@ | |||||
package com.ningdatech.kqapi.sso.model.vo; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
/** | |||||
* @author CMM | |||||
* @since 2024/04/07 11:19 | |||||
*/ | |||||
@Data | |||||
@ApiModel(value = "SsoTokenVO", description = "单点登录TokenVO") | |||||
public class SsoTokenVO { | |||||
@ApiModelProperty("错误码") | |||||
private String errorCode; | |||||
@ApiModelProperty("错误信息") | |||||
private String errorMsg; | |||||
@ApiModelProperty("是否成功") | |||||
private Boolean success; | |||||
@ApiModelProperty("响应体") | |||||
private Object data; | |||||
@ApiModelProperty("token") | |||||
private String token; | |||||
} |
@@ -0,0 +1,154 @@ | |||||
package com.ningdatech.kqapi.sso.model.vo; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import java.util.List; | |||||
/** | |||||
* @author CMM | |||||
* @since 2024/04/07 11:19 | |||||
*/ | |||||
@Data | |||||
@ApiModel(value = "SsoUserInfoVO", description = "单点登录UserInfoVO") | |||||
public class SsoUserInfoVO { | |||||
@ApiModelProperty("错误码") | |||||
private String errorCode; | |||||
@ApiModelProperty("错误信息") | |||||
private String errorMsg; | |||||
@ApiModelProperty("是否成功") | |||||
private Boolean success; | |||||
@ApiModelProperty("响应体") | |||||
private Object data; | |||||
@ApiModelProperty("用户类型 PERSON 个人、LEGAL_PERSON 法人") | |||||
private String userType; | |||||
@ApiModelProperty("个人用户信息 当前登录自然人的信息") | |||||
private Object personInfo; | |||||
@ApiModelProperty("主键") | |||||
private String userId; | |||||
@ApiModelProperty("个人姓名") | |||||
private String userName; | |||||
@ApiModelProperty("ID_CARD:身份证,PASSPORT:护\n" + | |||||
"照,OFFICER_CARD:军官\n" + | |||||
"证,MAINLAND_TRAVEL_PERMIT_FOR\n" + | |||||
"_HONGKONG_AND_MACAO_RESIDENTS\n" + | |||||
":港澳居民来往内地通行\n" + | |||||
"证,MAINLAND_TRAVEL_PERMIT_FOR\n" + | |||||
"_TAIWAN_RESIDENTS:台湾居民来\n" + | |||||
"往大陆通行\n" + | |||||
"证,FOREIGN_PERMANENT_RESIDENT\n" + | |||||
"_ID_CARD:外国人永久居留身份\n" + | |||||
"证,FOREIGN_PASSPORT:外籍人士\n" + | |||||
"护照,DIPLOMACY_PASSPORT:外交\n" + | |||||
"护照,OFFICIAL_PASSPORT:公务护\n" + | |||||
"照,SOLDIER_CARD:士兵\n" + | |||||
"证,OFFICER_RETIRE_CARD:军官离\n" + | |||||
"退休\n" + | |||||
"证,GANG_AO_TAI_RESIDENCE_CART\n" + | |||||
":港澳台居民居住\n" + | |||||
"证,GANG_AO_ID_CART:港澳居民身\n" + | |||||
"份证,UNIFIED_SOCIAL_ID:统一社\n" + | |||||
"会信用代码,OTHER:其他") | |||||
private String idType; | |||||
@ApiModelProperty("外部证件类型") | |||||
private String outerIdType; | |||||
@ApiModelProperty("证件编号") | |||||
private String idNo; | |||||
@ApiModelProperty("法人经办人时用户类型,评级") | |||||
private String attnUserType; | |||||
@ApiModelProperty("手机号") | |||||
private String phone; | |||||
@ApiModelProperty("邮箱") | |||||
private String email; | |||||
@ApiModelProperty("民族") | |||||
private String nation; | |||||
@ApiModelProperty("性别") | |||||
private String gender; | |||||
@ApiModelProperty("生日") | |||||
private String birthday; | |||||
@ApiModelProperty("身份散列值") | |||||
private String certKey; | |||||
@ApiModelProperty("额外属性") | |||||
private Object attributes; | |||||
@ApiModelProperty("法人用户信息,比如公司相关的信\n" + | |||||
"息") | |||||
private Object legalPersonInfo; | |||||
@ApiModelProperty("法人名称") | |||||
private String name; | |||||
@ApiModelProperty("社会统一信用代码") | |||||
private String unifiedSocialId; | |||||
@ApiModelProperty("法人类型") | |||||
private String orgType; | |||||
@ApiModelProperty("经办人姓名") | |||||
private String attnName; | |||||
@ApiModelProperty("经办人手机号") | |||||
private String attnPhone; | |||||
@ApiModelProperty("经办人证件类型") | |||||
private String attnIdType; | |||||
@ApiModelProperty("经办人证件号码") | |||||
private String attnIdNo; | |||||
@ApiModelProperty("法人代表人姓名") | |||||
private String principal; | |||||
@ApiModelProperty("法人代表唯一键") | |||||
private String principalUserId; | |||||
@ApiModelProperty("法人唯一键") | |||||
private String corpId; | |||||
@ApiModelProperty("所属组织信息") | |||||
private List<Object> organizationInfoList; | |||||
@ApiModelProperty("组织主键") | |||||
private String orgId; | |||||
@ApiModelProperty("Alias for orgId") | |||||
private String oid; | |||||
@ApiModelProperty("父组织主键") | |||||
private String parentId; | |||||
@ApiModelProperty("Alias for parentId") | |||||
private String pid; | |||||
@ApiModelProperty("组织机构全称") | |||||
private String fullName; | |||||
@ApiModelProperty("组织后缀") | |||||
private String devCoding; | |||||
@ApiModelProperty("是否叶子标志") | |||||
private Boolean leafFlag; | |||||
@ApiModelProperty("排序号,从小到大") | |||||
private Integer orderBy; | |||||
} |
@@ -0,0 +1,132 @@ | |||||
package com.ningdatech.kqapi.sso.utils; | |||||
import java.io.UnsupportedEncodingException; | |||||
import java.net.URI; | |||||
import java.net.URL; | |||||
import java.net.URLEncoder; | |||||
import java.text.DateFormat; | |||||
import java.text.SimpleDateFormat; | |||||
import java.util.*; | |||||
import java.util.stream.Collectors; | |||||
import javax.crypto.Mac; | |||||
import javax.crypto.spec.SecretKeySpec; | |||||
import javax.xml.bind.DatatypeConverter; | |||||
import org.springframework.util.LinkedMultiValueMap; | |||||
import org.springframework.util.MultiValueMap; | |||||
import javafx.util.Pair; | |||||
import lombok.extern.slf4j.Slf4j; | |||||
/** | |||||
* @author CMM | |||||
* @since 2024/04/07 11:28 | |||||
*/ | |||||
@Slf4j | |||||
public class HmacAuthUtil { | |||||
/** | |||||
* 构造请求 header | |||||
* | |||||
* @param urlStr 请求url,全路径格式,比如:https://bcdsg.zj.gov.cn/api/p/v1/user.get | |||||
* @param requestMethod 请求方法,大写格式,如:GET, POST | |||||
* @param accessKey 应用的 AK | |||||
* @param secretKey 应用的 SK | |||||
* @return | |||||
*/ | |||||
public static Map<String, String> generateHeader(String urlStr, String requestMethod, String accessKey, String secretKey) { | |||||
log.info("params,urlStr={},requestMethod={},accessKey={},secretKey={}",urlStr,requestMethod,accessKey,secretKey); | |||||
Map<String, String> header = new HashMap<>(); | |||||
try { | |||||
DateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US); | |||||
dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); | |||||
String date = dateFormat.format(new Date()); | |||||
URL url = new URL(urlStr); | |||||
URI uri = new URI(url.getProtocol(), url.getHost(), url.getPath(), url.getQuery(), null); | |||||
String canonicalQueryString = getCanonicalQueryString(uri.getQuery()); | |||||
String message = requestMethod.toUpperCase() + "\n" + uri.getPath() + "\n" + canonicalQueryString + "\n" + accessKey + "\n" + date + "\n"; | |||||
Mac hasher = Mac.getInstance("HmacSHA256"); | |||||
hasher.init(new SecretKeySpec(secretKey.getBytes(), "HmacSHA256")); | |||||
byte[] hash = hasher.doFinal(message.getBytes()); | |||||
// to lowercase hexits | |||||
DatatypeConverter.printHexBinary(hash); | |||||
// to base64 | |||||
String sign = DatatypeConverter.printBase64Binary(hash); | |||||
header.put("X-BG-HMAC-SIGNATURE", sign); | |||||
header.put("X-BG-HMAC-ALGORITHM", "hmac-sha256"); | |||||
header.put("X-BG-HMAC-ACCESS-KEY", accessKey); | |||||
header.put("X-BG-DATE-TIME", date); | |||||
} catch (Exception e) { | |||||
log.error("generate error",e); | |||||
throw new RuntimeException("generate header error"); | |||||
} | |||||
log.info("header info,{}",header); | |||||
return header; | |||||
} | |||||
private static String getCanonicalQueryString(String query) { | |||||
if (query == null || query.trim().length() == 0) { | |||||
return ""; | |||||
} | |||||
List<javafx.util.Pair<String, String>> queryParamList = new ArrayList<>(); | |||||
String[] params = query.split("&"); | |||||
for (String param : params) { | |||||
int eqIndex = param.indexOf("="); | |||||
String key = param; | |||||
String value = ""; | |||||
if(eqIndex!=-1){ | |||||
key = param.substring(0, eqIndex); | |||||
value = param.substring(eqIndex+1); | |||||
} | |||||
javafx.util.Pair<String, String> pair = new javafx.util.Pair<String, String>(key,value); | |||||
queryParamList.add(pair); | |||||
} | |||||
List<javafx.util.Pair<String, String>> sortedParamList = queryParamList.stream().sorted(Comparator.comparing(param -> param.getKey() + "=" + Optional.ofNullable(param.getValue()).orElse(""))).collect(Collectors.toList()); | |||||
List<javafx.util.Pair<String, String>> encodeParamList = new ArrayList<>(); | |||||
sortedParamList.stream().forEach(param -> { | |||||
try { | |||||
String key = URLEncoder.encode(param.getKey(), "utf-8"); | |||||
String value = URLEncoder.encode(Optional.ofNullable(param.getValue()).orElse(""), "utf-8") | |||||
.replaceAll("\\%2B","%20") | |||||
.replaceAll("\\+","%20") | |||||
.replaceAll("\\%21","!") | |||||
.replaceAll("\\%27","'") | |||||
.replaceAll("\\%28","(") | |||||
.replaceAll("\\%29",")") | |||||
.replaceAll("\\%7E","~") | |||||
.replaceAll("\\%25","%") | |||||
; | |||||
encodeParamList.add(new javafx.util.Pair<>(key, value)); | |||||
} catch (UnsupportedEncodingException e) { | |||||
throw new RuntimeException("encoding error"); | |||||
} | |||||
}); | |||||
StringBuilder queryParamString = new StringBuilder(64); | |||||
for (Pair<String, String> encodeParam : encodeParamList) { | |||||
queryParamString.append(encodeParam.getKey()).append("=").append(Optional.ofNullable(encodeParam.getValue()).orElse("")); | |||||
queryParamString.append("&"); | |||||
} | |||||
return queryParamString.substring(0, queryParamString.length() - 1); | |||||
} | |||||
public static MultiValueMap<String, String> convertToMultiValueMap(Map<String, String> sourceMap) { | |||||
LinkedMultiValueMap<String, String> multiValueMap = new LinkedMultiValueMap<>(); | |||||
for (Map.Entry<String, String> entry : sourceMap.entrySet()) { | |||||
multiValueMap.add(entry.getKey(), entry.getValue()); | |||||
} | |||||
return multiValueMap; | |||||
} | |||||
} |
@@ -127,5 +127,15 @@ jasypt: | |||||
algorithm: PBEWithMD5AndDES | algorithm: PBEWithMD5AndDES | ||||
# 指定initialization vector类型 | # 指定initialization vector类型 | ||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator | iv-generator-classname: org.jasypt.iv.NoIvGenerator | ||||
sso: | |||||
access-key: BCDSGA_c2494577610c90bdc33b95514601da2c | |||||
secret-key: BCDSGS_80bf0a606c0d2fd3201bd06a4f008250 | |||||
app-id: 2002399646 | |||||
token: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
user-info: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo | |||||
@@ -125,4 +125,14 @@ jasypt: | |||||
password: CodeSheep | password: CodeSheep | ||||
algorithm: PBEWithMD5AndDES | algorithm: PBEWithMD5AndDES | ||||
# 指定initialization vector类型 | # 指定initialization vector类型 | ||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator | |||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator | |||||
sso: | |||||
access-key: BCDSGA_c2494577610c90bdc33b95514601da2c | |||||
secret-key: BCDSGS_80bf0a606c0d2fd3201bd06a4f008250 | |||||
app-id: 2002399646 | |||||
token: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
user-info: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo |
@@ -127,5 +127,15 @@ jasypt: | |||||
algorithm: PBEWithMD5AndDES | algorithm: PBEWithMD5AndDES | ||||
# 指定initialization vector类型 | # 指定initialization vector类型 | ||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator | iv-generator-classname: org.jasypt.iv.NoIvGenerator | ||||
sso: | |||||
access-key: BCDSGA_c2494577610c90bdc33b95514601da2c | |||||
secret-key: BCDSGS_80bf0a606c0d2fd3201bd06a4f008250 | |||||
app-id: 2002399646 | |||||
token: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
user-info: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo | |||||
@@ -0,0 +1,141 @@ | |||||
server: | |||||
port: 33060 | |||||
servlet: | |||||
context-path: /kq | |||||
spring: | |||||
mvc: | |||||
pathmatch: | |||||
matching-strategy: ant_path_matcher | |||||
session: | |||||
store-type: redis | |||||
redis: | |||||
namespace: "spring:session" | |||||
timeout: 864000 | |||||
redis: | |||||
timeout: 5000 | |||||
host: 47.98.125.47 | |||||
port: 26379 | |||||
database: 7 | |||||
password: Ndkj1234 | |||||
jedis: | |||||
pool: | |||||
max-active: 200 | |||||
max-idle: 500 | |||||
min-idle: 8 | |||||
max-wait: 10000 | |||||
application: | |||||
name: kq | |||||
jackson: | |||||
default-property-inclusion: non_null | |||||
time-zone: GMT+8 | |||||
date-format: yyyy-MM-dd HH:mm:ss | |||||
jpa: | |||||
properties: | |||||
hibernate: | |||||
default_schema: PUBLIC | |||||
hbm2ddl: | |||||
auto: update | |||||
show_sql: true | |||||
show-sql: true | |||||
hibernate: | |||||
ddl-auto: update | |||||
datasource: | |||||
type: com.zaxxer.hikari.HikariDataSource | |||||
driver-class-name: com.mysql.cj.jdbc.Driver | |||||
url: ENC(aMGW3+FFqxyutRz9liYjAg+A72b6IQ7/ygtxO0DmQJ/LLFZkx8r4MhN8quv9L62nQ4sH55qFg+LnQoor/t8IqBACrbfNg462YNKnRyMsBmdHHxJm7i57flIQfePLDW93Omz4LZ2PbRZTvPcLLYtnQyxXSDPwDnjexHNVXTdxwuTJPBqthsVpvyA2mnn5Szef) | |||||
username: root | |||||
password: ENC(NHFdgnNk7opRJpNnZOJs51OTXb72zU//) | |||||
# 数据源 | |||||
hikari: | |||||
# 是客户端等待连接池连接的最大毫秒数 | |||||
connection-timeout: 30000 | |||||
# 是允许连接在连接池中空闲的最长时间 | |||||
minimum-idle: 5 | |||||
# 配置最大池大小 | |||||
maximum-pool-size: 300 | |||||
# 是允许连接在连接池中空闲的最长时间(以毫秒为单位) | |||||
idle-timeout: 60000 | |||||
# 池中连接关闭后的最长生命周期(以毫秒为单位) | |||||
max-lifetime: 600000 | |||||
# 配置从池返回的连接的默认自动提交行为。默认值为true。 | |||||
auto-commit: true | |||||
# 开启连接监测泄露 | |||||
leak-detection-threshold: 500000 | |||||
# 测试连接数据库 | |||||
connection-test-query: SELECT 1 | |||||
#设置上传 单个文件的大小 | |||||
servlet: | |||||
multipart: | |||||
max-file-size: 100MB | |||||
max-request-size: 150MB | |||||
mybatis-plus: | |||||
configuration: | |||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl | |||||
global-config: | |||||
db-config: | |||||
logic-delete-value: true | |||||
logic-not-delete-value: false | |||||
logging: | |||||
config: classpath:logback-spring.xml | |||||
#日志配置 | |||||
level: | |||||
root: info | |||||
file: | |||||
path: logs | |||||
nd: | |||||
cache: | |||||
type: REDIS | |||||
serializerType: ProtoStuff | |||||
cacheNullVal: true | |||||
def: | |||||
keyPrefix: kq | |||||
log: | |||||
enabled: true | |||||
type: DB | |||||
# 文件存储 | |||||
file: | |||||
storage-type: ALI_OSS | |||||
ali: | |||||
protocol: https:// | |||||
bucket: devplat | |||||
urlPrefix: oss-cn-hangzhou.aliyuncs.com | |||||
endpoint: oss-cn-hangzhou.aliyuncs.com | |||||
accessKeyId: LTAI4GL7uypycnBjiRn55rMG | |||||
accessKeySecret: qwYC7bW9bkStsko7qkLVnToAzj0Y98 | |||||
# 日志文件配置 | |||||
log: | |||||
path: ./logs | |||||
info: | |||||
file-size: 50MB | |||||
max-size: 5 | |||||
total-size: 200MB | |||||
error: | |||||
file-size: 10MB | |||||
max-size: 5 | |||||
total-size: 50MB | |||||
swagger: | |||||
enabled: true | |||||
hostname: iZbp13nwyvib53j4j1p2xoZ | |||||
jasypt: | |||||
encryptor: | |||||
password: CodeSheep | |||||
# 指定解密算法,需要和加密时使用的算法一致 | |||||
algorithm: PBEWithMD5AndDES | |||||
# 指定initialization vector类型 | |||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator | |||||
sso: | |||||
access-key: BCDSGA_c2494577610c90bdc33b95514601da2c | |||||
secret-key: BCDSGS_80bf0a606c0d2fd3201bd06a4f008250 | |||||
app-id: 2002399646 | |||||
token: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
user-info: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo | |||||
@@ -0,0 +1,138 @@ | |||||
server: | |||||
port: 33060 | |||||
servlet: | |||||
context-path: /kq | |||||
spring: | |||||
mvc: | |||||
pathmatch: | |||||
matching-strategy: ant_path_matcher | |||||
session: | |||||
store-type: redis | |||||
redis: | |||||
namespace: "spring:session" | |||||
timeout: 864000 | |||||
redis: | |||||
timeout: 5000 | |||||
host: 47.98.125.47 | |||||
port: 26379 | |||||
database: 7 | |||||
password: Ndkj1234 | |||||
jedis: | |||||
pool: | |||||
max-active: 200 | |||||
max-idle: 500 | |||||
min-idle: 8 | |||||
max-wait: 10000 | |||||
application: | |||||
name: kq | |||||
jackson: | |||||
default-property-inclusion: non_null | |||||
time-zone: GMT+8 | |||||
date-format: yyyy-MM-dd HH:mm:ss | |||||
jpa: | |||||
properties: | |||||
hibernate: | |||||
default_schema: PUBLIC | |||||
hbm2ddl: | |||||
auto: update | |||||
show_sql: true | |||||
show-sql: true | |||||
hibernate: | |||||
ddl-auto: update | |||||
datasource: | |||||
type: com.zaxxer.hikari.HikariDataSource | |||||
driver-class-name: com.mysql.cj.jdbc.Driver | |||||
url: ENC(aMGW3+FFqxyutRz9liYjAg+A72b6IQ7/ygtxO0DmQJ/LLFZkx8r4MhN8quv9L62nQ4sH55qFg+LnQoor/t8IqBACrbfNg462YNKnRyMsBmdHHxJm7i57flIQfePLDW93Omz4LZ2PbRZTvPcLLYtnQyxXSDPwDnjexHNVXTdxwuTJPBqthsVpvyA2mnn5Szef) | |||||
username: root | |||||
password: NingdaKeji123! | |||||
# 数据源 | |||||
hikari: | |||||
# 是客户端等待连接池连接的最大毫秒数 | |||||
connection-timeout: 30000 | |||||
# 是允许连接在连接池中空闲的最长时间 | |||||
minimum-idle: 5 | |||||
# 配置最大池大小 | |||||
maximum-pool-size: 300 | |||||
# 是允许连接在连接池中空闲的最长时间(以毫秒为单位) | |||||
idle-timeout: 60000 | |||||
# 池中连接关闭后的最长生命周期(以毫秒为单位) | |||||
max-lifetime: 600000 | |||||
# 配置从池返回的连接的默认自动提交行为。默认值为true。 | |||||
auto-commit: true | |||||
# 开启连接监测泄露 | |||||
leak-detection-threshold: 500000 | |||||
# 测试连接数据库 | |||||
connection-test-query: SELECT 1 | |||||
#设置上传 单个文件的大小 | |||||
servlet: | |||||
multipart: | |||||
max-file-size: 100MB | |||||
max-request-size: 150MB | |||||
mybatis-plus: | |||||
configuration: | |||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl | |||||
global-config: | |||||
db-config: | |||||
logic-delete-value: true | |||||
logic-not-delete-value: false | |||||
logging: | |||||
config: classpath:logback-spring.xml | |||||
#日志配置 | |||||
level: | |||||
root: info | |||||
file: | |||||
path: logs | |||||
nd: | |||||
cache: | |||||
type: REDIS | |||||
serializerType: ProtoStuff | |||||
cacheNullVal: true | |||||
def: | |||||
keyPrefix: kq | |||||
log: | |||||
enabled: true | |||||
type: DB | |||||
# 文件存储 | |||||
file: | |||||
storage-type: ALI_OSS | |||||
ali: | |||||
protocol: https:// | |||||
bucket: devplat | |||||
urlPrefix: oss-cn-hangzhou.aliyuncs.com | |||||
endpoint: oss-cn-hangzhou.aliyuncs.com | |||||
accessKeyId: LTAI4GL7uypycnBjiRn55rMG | |||||
accessKeySecret: qwYC7bW9bkStsko7qkLVnToAzj0Y98 | |||||
# 日志文件配置 | |||||
log: | |||||
path: ./logs | |||||
info: | |||||
file-size: 50MB | |||||
max-size: 5 | |||||
total-size: 200MB | |||||
error: | |||||
file-size: 10MB | |||||
max-size: 5 | |||||
total-size: 50MB | |||||
swagger: | |||||
enabled: true | |||||
hostname: iZbp13nwyvib53j4j1p2xoZ | |||||
jasypt: | |||||
encryptor: | |||||
password: CodeSheep | |||||
algorithm: PBEWithMD5AndDES | |||||
# 指定initialization vector类型 | |||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator | |||||
sso: | |||||
access-key: BCDSGA_c2494577610c90bdc33b95514601da2c | |||||
secret-key: BCDSGS_80bf0a606c0d2fd3201bd06a4f008250 | |||||
app-id: 2002399646 | |||||
token: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
user-info: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo |
@@ -0,0 +1,141 @@ | |||||
server: | |||||
port: 33061 | |||||
servlet: | |||||
context-path: /kq | |||||
spring: | |||||
mvc: | |||||
pathmatch: | |||||
matching-strategy: ant_path_matcher | |||||
session: | |||||
store-type: redis | |||||
redis: | |||||
namespace: "spring:session" | |||||
timeout: 864000 | |||||
redis: | |||||
timeout: 5000 | |||||
host: 47.98.125.47 | |||||
port: 26379 | |||||
database: 7 | |||||
password: Ndkj1234 | |||||
jedis: | |||||
pool: | |||||
max-active: 200 | |||||
max-idle: 500 | |||||
min-idle: 8 | |||||
max-wait: 10000 | |||||
application: | |||||
name: kq | |||||
jackson: | |||||
default-property-inclusion: non_null | |||||
time-zone: GMT+8 | |||||
date-format: yyyy-MM-dd HH:mm:ss | |||||
jpa: | |||||
properties: | |||||
hibernate: | |||||
default_schema: PUBLIC | |||||
hbm2ddl: | |||||
auto: update | |||||
show_sql: true | |||||
show-sql: true | |||||
hibernate: | |||||
ddl-auto: update | |||||
datasource: | |||||
type: com.zaxxer.hikari.HikariDataSource | |||||
driver-class-name: com.mysql.cj.jdbc.Driver | |||||
url: ENC(gtE4OUrpgtFsh6B3aLiSp2sVSX1BYDET9Uii/wRP2RboRK0NDaYu1S7Vx30cHXFE7vecQzY1UbrSFW/BaWJvQ3XJxfDiaUxdrIDND5e+DMTjx1pUkfS8/RbXHQDE+QoOVZV1UKEtdq+khr32tlQXqkTnzmZGuZjctVmjdQxUnmI2YNpoeNlIAkDXiaCvcVYc) | |||||
username: root | |||||
password: Nd@20231116 | |||||
# 数据源 | |||||
hikari: | |||||
# 是客户端等待连接池连接的最大毫秒数 | |||||
connection-timeout: 30000 | |||||
# 是允许连接在连接池中空闲的最长时间 | |||||
minimum-idle: 5 | |||||
# 配置最大池大小 | |||||
maximum-pool-size: 300 | |||||
# 是允许连接在连接池中空闲的最长时间(以毫秒为单位) | |||||
idle-timeout: 60000 | |||||
# 池中连接关闭后的最长生命周期(以毫秒为单位) | |||||
max-lifetime: 600000 | |||||
# 配置从池返回的连接的默认自动提交行为。默认值为true。 | |||||
auto-commit: true | |||||
# 开启连接监测泄露 | |||||
leak-detection-threshold: 500000 | |||||
# 测试连接数据库 | |||||
connection-test-query: SELECT 1 | |||||
#设置上传 单个文件的大小 | |||||
servlet: | |||||
multipart: | |||||
max-file-size: 100MB | |||||
max-request-size: 150MB | |||||
mybatis-plus: | |||||
configuration: | |||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl | |||||
global-config: | |||||
db-config: | |||||
logic-delete-value: true | |||||
logic-not-delete-value: false | |||||
logging: | |||||
config: classpath:logback-spring.xml | |||||
#日志配置 | |||||
level: | |||||
root: info | |||||
file: | |||||
path: logs | |||||
nd: | |||||
cache: | |||||
type: REDIS | |||||
serializerType: ProtoStuff | |||||
cacheNullVal: true | |||||
def: | |||||
keyPrefix: kq | |||||
log: | |||||
enabled: true | |||||
type: DB | |||||
# 文件存储 | |||||
file: | |||||
storage-type: ALI_OSS | |||||
ali: | |||||
protocol: https:// | |||||
bucket: devplat | |||||
urlPrefix: oss-cn-hangzhou.aliyuncs.com | |||||
endpoint: oss-cn-hangzhou.aliyuncs.com | |||||
accessKeyId: LTAI4GL7uypycnBjiRn55rMG | |||||
accessKeySecret: qwYC7bW9bkStsko7qkLVnToAzj0Y98 | |||||
# 日志文件配置 | |||||
log: | |||||
path: ./logs | |||||
info: | |||||
file-size: 50MB | |||||
max-size: 5 | |||||
total-size: 200MB | |||||
error: | |||||
file-size: 10MB | |||||
max-size: 5 | |||||
total-size: 50MB | |||||
swagger: | |||||
enabled: true | |||||
hostname: iZut201mqskxt0mwme4tjfZ | |||||
jasypt: | |||||
encryptor: | |||||
password: CodeSheep | |||||
algorithm: PBEWithMD5AndDES | |||||
# 指定initialization vector类型 | |||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator | |||||
sso: | |||||
access-key: BCDSGA_c2494577610c90bdc33b95514601da2c | |||||
secret-key: BCDSGS_80bf0a606c0d2fd3201bd06a4f008250 | |||||
app-id: 2002399646 | |||||
token: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
user-info: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo | |||||
@@ -0,0 +1,3 @@ | |||||
spring: | |||||
profiles: | |||||
active: dev |
@@ -0,0 +1,68 @@ | |||||
<configuration scan="true" scanPeriod="10 seconds"> | |||||
<springProperty name="logPath" scope="context" source="log.path" defaultValue="./logs"/> | |||||
<springProperty name="infoFileSize" scope="context" source="log.info.file-size"/> | |||||
<springProperty name="infoMaxSize" scope="context" source="log.info.max-size"/> | |||||
<springProperty name="infoTotalSize" scope="context" source="log.info.total-size"/> | |||||
<springProperty name="errorFileSize" scope="context" source="log.error.file-size"/> | |||||
<springProperty name="errorMaxSize" scope="context" source="log.error.max-size"/> | |||||
<springProperty name="errorTotalSize" scope="context" source="log.error.total-size"/> | |||||
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |||||
<File>${logPath}/info.log</File> | |||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |||||
<fileNamePattern>${logPath}/info-%d{yyyyMMdd}-%i.log</fileNamePattern> | |||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> | |||||
<maxFileSize>${infoFileSize}</maxFileSize> | |||||
</timeBasedFileNamingAndTriggeringPolicy> | |||||
<maxHistory>${infoMaxSize}</maxHistory> | |||||
<totalSizeCap>${infoTotalSize}</totalSizeCap> | |||||
</rollingPolicy> | |||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder"> | |||||
<layout class="ch.qos.logback.classic.PatternLayout"> | |||||
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} -%msg%n | |||||
</Pattern> | |||||
</layout> | |||||
<charset>UTF-8</charset> | |||||
</encoder> | |||||
</appender> | |||||
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> | |||||
<level>ERROR</level> | |||||
</filter> | |||||
<File>${logPath}/error.log</File> | |||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |||||
<fileNamePattern>${logPath}/error-%d{yyyyMMdd}-%i.log</fileNamePattern> | |||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> | |||||
<maxFileSize>${errorFileSize}</maxFileSize> | |||||
</timeBasedFileNamingAndTriggeringPolicy> | |||||
<maxHistory>${errorMaxSize}</maxHistory> | |||||
<totalSizeCap>${errorTotalSize}</totalSizeCap> | |||||
</rollingPolicy> | |||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder"> | |||||
<layout class="ch.qos.logback.classic.PatternLayout"> | |||||
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} -%msg%n | |||||
</Pattern> | |||||
</layout> | |||||
<charset>UTF-8</charset> | |||||
</encoder> | |||||
</appender> | |||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |||||
<encoder> | |||||
<pattern> | |||||
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} -%msg%n | |||||
</pattern> | |||||
<charset>UTF-8</charset> | |||||
</encoder> | |||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> | |||||
<level>DEBUG</level> | |||||
</filter> | |||||
</appender> | |||||
<root level="INFO"> | |||||
<appender-ref ref="INFO_FILE"/> | |||||
<appender-ref ref="ERROR_FILE"/> | |||||
<appender-ref ref="STDOUT"/> | |||||
</root> | |||||
</configuration> |
@@ -0,0 +1,52 @@ | |||||
{ | |||||
"groups": [ | |||||
{ | |||||
"name": "organization", | |||||
"type": "com.ningdatech.kqapi.common.config.DingOrganizationProperties", | |||||
"sourceType": "com.ningdatech.kqapi.common.config.DingOrganizationProperties" | |||||
}, | |||||
{ | |||||
"name": "provincial", | |||||
"type": "com.ningdatech.kqapi.common.config.ProvincialProperties", | |||||
"sourceType": "com.ningdatech.kqapi.common.config.ProvincialProperties" | |||||
} | |||||
], | |||||
"properties": [ | |||||
{ | |||||
"name": "organization.dept-visible-scopes", | |||||
"type": "java.util.List<java.lang.String>", | |||||
"sourceType": "com.ningdatech.kqapi.common.config.DingOrganizationProperties" | |||||
}, | |||||
{ | |||||
"name": "provincial.detail-url", | |||||
"type": "java.lang.String", | |||||
"sourceType": "com.ningdatech.kqapi.common.config.ProvincialProperties" | |||||
}, | |||||
{ | |||||
"name": "provincial.domain-url", | |||||
"type": "java.lang.String", | |||||
"sourceType": "com.ningdatech.kqapi.common.config.ProvincialProperties" | |||||
}, | |||||
{ | |||||
"name": "provincial.host", | |||||
"type": "java.lang.String", | |||||
"sourceType": "com.ningdatech.kqapi.common.config.ProvincialProperties" | |||||
}, | |||||
{ | |||||
"name": "provincial.key", | |||||
"type": "java.lang.String", | |||||
"sourceType": "com.ningdatech.kqapi.common.config.ProvincialProperties" | |||||
}, | |||||
{ | |||||
"name": "provincial.push-url", | |||||
"type": "java.lang.String", | |||||
"sourceType": "com.ningdatech.kqapi.common.config.ProvincialProperties" | |||||
}, | |||||
{ | |||||
"name": "provincial.secret", | |||||
"type": "java.lang.String", | |||||
"sourceType": "com.ningdatech.kqapi.common.config.ProvincialProperties" | |||||
} | |||||
], | |||||
"hints": [] | |||||
} |
@@ -0,0 +1,141 @@ | |||||
server: | |||||
port: 33060 | |||||
servlet: | |||||
context-path: /kq | |||||
spring: | |||||
mvc: | |||||
pathmatch: | |||||
matching-strategy: ant_path_matcher | |||||
session: | |||||
store-type: redis | |||||
redis: | |||||
namespace: "spring:session" | |||||
timeout: 864000 | |||||
redis: | |||||
timeout: 5000 | |||||
host: 47.98.125.47 | |||||
port: 26379 | |||||
database: 7 | |||||
password: Ndkj1234 | |||||
jedis: | |||||
pool: | |||||
max-active: 200 | |||||
max-idle: 500 | |||||
min-idle: 8 | |||||
max-wait: 10000 | |||||
application: | |||||
name: kq | |||||
jackson: | |||||
default-property-inclusion: non_null | |||||
time-zone: GMT+8 | |||||
date-format: yyyy-MM-dd HH:mm:ss | |||||
jpa: | |||||
properties: | |||||
hibernate: | |||||
default_schema: PUBLIC | |||||
hbm2ddl: | |||||
auto: update | |||||
show_sql: true | |||||
show-sql: true | |||||
hibernate: | |||||
ddl-auto: update | |||||
datasource: | |||||
type: com.zaxxer.hikari.HikariDataSource | |||||
driver-class-name: com.mysql.cj.jdbc.Driver | |||||
url: ENC(aMGW3+FFqxyutRz9liYjAg+A72b6IQ7/ygtxO0DmQJ/LLFZkx8r4MhN8quv9L62nQ4sH55qFg+LnQoor/t8IqBACrbfNg462YNKnRyMsBmdHHxJm7i57flIQfePLDW93Omz4LZ2PbRZTvPcLLYtnQyxXSDPwDnjexHNVXTdxwuTJPBqthsVpvyA2mnn5Szef) | |||||
username: root | |||||
password: ENC(NHFdgnNk7opRJpNnZOJs51OTXb72zU//) | |||||
# 数据源 | |||||
hikari: | |||||
# 是客户端等待连接池连接的最大毫秒数 | |||||
connection-timeout: 30000 | |||||
# 是允许连接在连接池中空闲的最长时间 | |||||
minimum-idle: 5 | |||||
# 配置最大池大小 | |||||
maximum-pool-size: 300 | |||||
# 是允许连接在连接池中空闲的最长时间(以毫秒为单位) | |||||
idle-timeout: 60000 | |||||
# 池中连接关闭后的最长生命周期(以毫秒为单位) | |||||
max-lifetime: 600000 | |||||
# 配置从池返回的连接的默认自动提交行为。默认值为true。 | |||||
auto-commit: true | |||||
# 开启连接监测泄露 | |||||
leak-detection-threshold: 500000 | |||||
# 测试连接数据库 | |||||
connection-test-query: SELECT 1 | |||||
#设置上传 单个文件的大小 | |||||
servlet: | |||||
multipart: | |||||
max-file-size: 100MB | |||||
max-request-size: 150MB | |||||
mybatis-plus: | |||||
configuration: | |||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl | |||||
global-config: | |||||
db-config: | |||||
logic-delete-value: true | |||||
logic-not-delete-value: false | |||||
logging: | |||||
config: classpath:logback-spring.xml | |||||
#日志配置 | |||||
level: | |||||
root: info | |||||
file: | |||||
path: logs | |||||
nd: | |||||
cache: | |||||
type: REDIS | |||||
serializerType: ProtoStuff | |||||
cacheNullVal: true | |||||
def: | |||||
keyPrefix: kq | |||||
log: | |||||
enabled: true | |||||
type: DB | |||||
# 文件存储 | |||||
file: | |||||
storage-type: ALI_OSS | |||||
ali: | |||||
protocol: https:// | |||||
bucket: devplat | |||||
urlPrefix: oss-cn-hangzhou.aliyuncs.com | |||||
endpoint: oss-cn-hangzhou.aliyuncs.com | |||||
accessKeyId: LTAI4GL7uypycnBjiRn55rMG | |||||
accessKeySecret: qwYC7bW9bkStsko7qkLVnToAzj0Y98 | |||||
# 日志文件配置 | |||||
log: | |||||
path: ./logs | |||||
info: | |||||
file-size: 50MB | |||||
max-size: 5 | |||||
total-size: 200MB | |||||
error: | |||||
file-size: 10MB | |||||
max-size: 5 | |||||
total-size: 50MB | |||||
swagger: | |||||
enabled: true | |||||
hostname: iZbp13nwyvib53j4j1p2xoZ | |||||
jasypt: | |||||
encryptor: | |||||
password: CodeSheep | |||||
# 指定解密算法,需要和加密时使用的算法一致 | |||||
algorithm: PBEWithMD5AndDES | |||||
# 指定initialization vector类型 | |||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator | |||||
sso: | |||||
access-key: BCDSGA_c2494577610c90bdc33b95514601da2c | |||||
secret-key: BCDSGS_80bf0a606c0d2fd3201bd06a4f008250 | |||||
app-id: 2002399646 | |||||
token: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
user-info: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo | |||||
@@ -0,0 +1,138 @@ | |||||
server: | |||||
port: 33060 | |||||
servlet: | |||||
context-path: /kq | |||||
spring: | |||||
mvc: | |||||
pathmatch: | |||||
matching-strategy: ant_path_matcher | |||||
session: | |||||
store-type: redis | |||||
redis: | |||||
namespace: "spring:session" | |||||
timeout: 864000 | |||||
redis: | |||||
timeout: 5000 | |||||
host: 47.98.125.47 | |||||
port: 26379 | |||||
database: 7 | |||||
password: Ndkj1234 | |||||
jedis: | |||||
pool: | |||||
max-active: 200 | |||||
max-idle: 500 | |||||
min-idle: 8 | |||||
max-wait: 10000 | |||||
application: | |||||
name: kq | |||||
jackson: | |||||
default-property-inclusion: non_null | |||||
time-zone: GMT+8 | |||||
date-format: yyyy-MM-dd HH:mm:ss | |||||
jpa: | |||||
properties: | |||||
hibernate: | |||||
default_schema: PUBLIC | |||||
hbm2ddl: | |||||
auto: update | |||||
show_sql: true | |||||
show-sql: true | |||||
hibernate: | |||||
ddl-auto: update | |||||
datasource: | |||||
type: com.zaxxer.hikari.HikariDataSource | |||||
driver-class-name: com.mysql.cj.jdbc.Driver | |||||
url: ENC(aMGW3+FFqxyutRz9liYjAg+A72b6IQ7/ygtxO0DmQJ/LLFZkx8r4MhN8quv9L62nQ4sH55qFg+LnQoor/t8IqBACrbfNg462YNKnRyMsBmdHHxJm7i57flIQfePLDW93Omz4LZ2PbRZTvPcLLYtnQyxXSDPwDnjexHNVXTdxwuTJPBqthsVpvyA2mnn5Szef) | |||||
username: root | |||||
password: NingdaKeji123! | |||||
# 数据源 | |||||
hikari: | |||||
# 是客户端等待连接池连接的最大毫秒数 | |||||
connection-timeout: 30000 | |||||
# 是允许连接在连接池中空闲的最长时间 | |||||
minimum-idle: 5 | |||||
# 配置最大池大小 | |||||
maximum-pool-size: 300 | |||||
# 是允许连接在连接池中空闲的最长时间(以毫秒为单位) | |||||
idle-timeout: 60000 | |||||
# 池中连接关闭后的最长生命周期(以毫秒为单位) | |||||
max-lifetime: 600000 | |||||
# 配置从池返回的连接的默认自动提交行为。默认值为true。 | |||||
auto-commit: true | |||||
# 开启连接监测泄露 | |||||
leak-detection-threshold: 500000 | |||||
# 测试连接数据库 | |||||
connection-test-query: SELECT 1 | |||||
#设置上传 单个文件的大小 | |||||
servlet: | |||||
multipart: | |||||
max-file-size: 100MB | |||||
max-request-size: 150MB | |||||
mybatis-plus: | |||||
configuration: | |||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl | |||||
global-config: | |||||
db-config: | |||||
logic-delete-value: true | |||||
logic-not-delete-value: false | |||||
logging: | |||||
config: classpath:logback-spring.xml | |||||
#日志配置 | |||||
level: | |||||
root: info | |||||
file: | |||||
path: logs | |||||
nd: | |||||
cache: | |||||
type: REDIS | |||||
serializerType: ProtoStuff | |||||
cacheNullVal: true | |||||
def: | |||||
keyPrefix: kq | |||||
log: | |||||
enabled: true | |||||
type: DB | |||||
# 文件存储 | |||||
file: | |||||
storage-type: ALI_OSS | |||||
ali: | |||||
protocol: https:// | |||||
bucket: devplat | |||||
urlPrefix: oss-cn-hangzhou.aliyuncs.com | |||||
endpoint: oss-cn-hangzhou.aliyuncs.com | |||||
accessKeyId: LTAI4GL7uypycnBjiRn55rMG | |||||
accessKeySecret: qwYC7bW9bkStsko7qkLVnToAzj0Y98 | |||||
# 日志文件配置 | |||||
log: | |||||
path: ./logs | |||||
info: | |||||
file-size: 50MB | |||||
max-size: 5 | |||||
total-size: 200MB | |||||
error: | |||||
file-size: 10MB | |||||
max-size: 5 | |||||
total-size: 50MB | |||||
swagger: | |||||
enabled: true | |||||
hostname: iZbp13nwyvib53j4j1p2xoZ | |||||
jasypt: | |||||
encryptor: | |||||
password: CodeSheep | |||||
algorithm: PBEWithMD5AndDES | |||||
# 指定initialization vector类型 | |||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator | |||||
sso: | |||||
access-key: BCDSGA_c2494577610c90bdc33b95514601da2c | |||||
secret-key: BCDSGS_80bf0a606c0d2fd3201bd06a4f008250 | |||||
app-id: 2002399646 | |||||
token: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
user-info: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo |
@@ -0,0 +1,141 @@ | |||||
server: | |||||
port: 33061 | |||||
servlet: | |||||
context-path: /kq | |||||
spring: | |||||
mvc: | |||||
pathmatch: | |||||
matching-strategy: ant_path_matcher | |||||
session: | |||||
store-type: redis | |||||
redis: | |||||
namespace: "spring:session" | |||||
timeout: 864000 | |||||
redis: | |||||
timeout: 5000 | |||||
host: 47.98.125.47 | |||||
port: 26379 | |||||
database: 7 | |||||
password: Ndkj1234 | |||||
jedis: | |||||
pool: | |||||
max-active: 200 | |||||
max-idle: 500 | |||||
min-idle: 8 | |||||
max-wait: 10000 | |||||
application: | |||||
name: kq | |||||
jackson: | |||||
default-property-inclusion: non_null | |||||
time-zone: GMT+8 | |||||
date-format: yyyy-MM-dd HH:mm:ss | |||||
jpa: | |||||
properties: | |||||
hibernate: | |||||
default_schema: PUBLIC | |||||
hbm2ddl: | |||||
auto: update | |||||
show_sql: true | |||||
show-sql: true | |||||
hibernate: | |||||
ddl-auto: update | |||||
datasource: | |||||
type: com.zaxxer.hikari.HikariDataSource | |||||
driver-class-name: com.mysql.cj.jdbc.Driver | |||||
url: ENC(gtE4OUrpgtFsh6B3aLiSp2sVSX1BYDET9Uii/wRP2RboRK0NDaYu1S7Vx30cHXFE7vecQzY1UbrSFW/BaWJvQ3XJxfDiaUxdrIDND5e+DMTjx1pUkfS8/RbXHQDE+QoOVZV1UKEtdq+khr32tlQXqkTnzmZGuZjctVmjdQxUnmI2YNpoeNlIAkDXiaCvcVYc) | |||||
username: root | |||||
password: Nd@20231116 | |||||
# 数据源 | |||||
hikari: | |||||
# 是客户端等待连接池连接的最大毫秒数 | |||||
connection-timeout: 30000 | |||||
# 是允许连接在连接池中空闲的最长时间 | |||||
minimum-idle: 5 | |||||
# 配置最大池大小 | |||||
maximum-pool-size: 300 | |||||
# 是允许连接在连接池中空闲的最长时间(以毫秒为单位) | |||||
idle-timeout: 60000 | |||||
# 池中连接关闭后的最长生命周期(以毫秒为单位) | |||||
max-lifetime: 600000 | |||||
# 配置从池返回的连接的默认自动提交行为。默认值为true。 | |||||
auto-commit: true | |||||
# 开启连接监测泄露 | |||||
leak-detection-threshold: 500000 | |||||
# 测试连接数据库 | |||||
connection-test-query: SELECT 1 | |||||
#设置上传 单个文件的大小 | |||||
servlet: | |||||
multipart: | |||||
max-file-size: 100MB | |||||
max-request-size: 150MB | |||||
mybatis-plus: | |||||
configuration: | |||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl | |||||
global-config: | |||||
db-config: | |||||
logic-delete-value: true | |||||
logic-not-delete-value: false | |||||
logging: | |||||
config: classpath:logback-spring.xml | |||||
#日志配置 | |||||
level: | |||||
root: info | |||||
file: | |||||
path: logs | |||||
nd: | |||||
cache: | |||||
type: REDIS | |||||
serializerType: ProtoStuff | |||||
cacheNullVal: true | |||||
def: | |||||
keyPrefix: kq | |||||
log: | |||||
enabled: true | |||||
type: DB | |||||
# 文件存储 | |||||
file: | |||||
storage-type: ALI_OSS | |||||
ali: | |||||
protocol: https:// | |||||
bucket: devplat | |||||
urlPrefix: oss-cn-hangzhou.aliyuncs.com | |||||
endpoint: oss-cn-hangzhou.aliyuncs.com | |||||
accessKeyId: LTAI4GL7uypycnBjiRn55rMG | |||||
accessKeySecret: qwYC7bW9bkStsko7qkLVnToAzj0Y98 | |||||
# 日志文件配置 | |||||
log: | |||||
path: ./logs | |||||
info: | |||||
file-size: 50MB | |||||
max-size: 5 | |||||
total-size: 200MB | |||||
error: | |||||
file-size: 10MB | |||||
max-size: 5 | |||||
total-size: 50MB | |||||
swagger: | |||||
enabled: true | |||||
hostname: iZut201mqskxt0mwme4tjfZ | |||||
jasypt: | |||||
encryptor: | |||||
password: CodeSheep | |||||
algorithm: PBEWithMD5AndDES | |||||
# 指定initialization vector类型 | |||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator | |||||
sso: | |||||
access-key: BCDSGA_c2494577610c90bdc33b95514601da2c | |||||
secret-key: BCDSGS_80bf0a606c0d2fd3201bd06a4f008250 | |||||
app-id: 2002399646 | |||||
token: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000007/uc/sso/access_token | |||||
user-info: | |||||
internet-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo | |||||
zww-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220329000008/uc/sso/getUserInfo | |||||
@@ -0,0 +1,3 @@ | |||||
spring: | |||||
profiles: | |||||
active: dev |