development test
parent
7405ea7549
commit
0912cf737a
|
|
@ -23,6 +23,11 @@
|
|||
<artifactId>spring-context</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-base-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Lombok -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
|
|
|
|||
|
|
@ -1,18 +1,15 @@
|
|||
package org.qinan.safetyeval.start;
|
||||
|
||||
import com.jjb.saas.base.starter.bootstart.JJBSpringbootApplication;
|
||||
import com.jjb.saas.gateway.starter.annotation.EnableGatewayServer;
|
||||
import com.jjb.saas.secure.annotation.EnableSecureServer;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping;
|
||||
import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
|
||||
/**
|
||||
* 安全评价业务服务启动类
|
||||
|
|
@ -22,10 +19,18 @@ import java.util.List;
|
|||
*
|
||||
* @author safety-eval
|
||||
*/
|
||||
|
||||
|
||||
@Slf4j
|
||||
@JJBSpringbootApplication
|
||||
@EnableSecureServer(basePackage = "com.jjb.saas.certificate.adapter")
|
||||
@EnableGatewayServer
|
||||
@EnableAsync
|
||||
@EnableDiscoveryClient
|
||||
|
||||
@SpringBootApplication(scanBasePackages = {"org.qinan.safetyeval", "com.jjb.saas"})
|
||||
@EnableDubbo
|
||||
@EnableFeignClients(basePackages = {"org.qinan.safetyeval", "com.jjb.saas"})
|
||||
@Slf4j
|
||||
public class SafetyEvalApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
|
@ -33,31 +38,4 @@ public class SafetyEvalApplication {
|
|||
SpringApplication.run(SafetyEvalApplication.class, args);
|
||||
log.info("SafetyEvalApplication-启动成功-耗时:{} min", (((float) (System.currentTimeMillis() - startTimeMillis)) / 60000L));
|
||||
}
|
||||
|
||||
@Bean
|
||||
public static BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() {
|
||||
return new BeanPostProcessor() {
|
||||
@Override
|
||||
public Object postProcessAfterInitialization(Object bean, String beanName) {
|
||||
if (bean instanceof WebMvcRequestHandlerProvider) {
|
||||
removePathPatternHandlerMappings(bean);
|
||||
}
|
||||
return bean;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static void removePathPatternHandlerMappings(Object bean) {
|
||||
Field field = ReflectionUtils.findField(bean.getClass(), "handlerMappings");
|
||||
if (field == null) {
|
||||
return;
|
||||
}
|
||||
field.setAccessible(true);
|
||||
List<RequestMappingInfoHandlerMapping> mappings =
|
||||
(List<RequestMappingInfoHandlerMapping>) ReflectionUtils.getField(field, bean);
|
||||
if (mappings != null) {
|
||||
mappings.removeIf(mapping -> mapping.getPatternParser() != null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,107 +1,196 @@
|
|||
# =============================================
|
||||
# 安全评价业务服务 - 公共配置(所有环境共享)
|
||||
# =============================================
|
||||
application:
|
||||
name: jjb-saas-cq-anquan
|
||||
version:
|
||||
gateway: cqanquan
|
||||
cn-name: 重庆安全评价
|
||||
|
||||
|
||||
atta:
|
||||
server:
|
||||
port: 8095
|
||||
servlet:
|
||||
context-path: /safety-eval
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: safety-eval-service
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ant_path_matcher
|
||||
profiles:
|
||||
active: local
|
||||
config:
|
||||
import:
|
||||
- classpath:sdk-prod2.yml
|
||||
servlet:
|
||||
multipart:
|
||||
enabled: true
|
||||
max-file-size: 100MB
|
||||
max-request-size: 500MB
|
||||
|
||||
|
||||
# ---------- MyBatis Plus ----------
|
||||
path: http://jjb-saas-attachment
|
||||
#path: http://10.96.190.83
|
||||
sdk:
|
||||
content-path: /safety-eval
|
||||
server:
|
||||
app-key: 0bb989ecada5472c89635018ece9f336
|
||||
client:
|
||||
gateway:
|
||||
url: ${common.gateway.network.http.intranet}
|
||||
route:
|
||||
- client:
|
||||
system-code: jjb-saas-safety-eval
|
||||
name: 资质评估
|
||||
group-code: public_api
|
||||
service:
|
||||
system-code: jjb-saas-safety-eval
|
||||
name: 资质评估
|
||||
group-code: public_api
|
||||
strip-prefix: 0
|
||||
uri: ${common.uris.jjb-saas-safety-eval}
|
||||
path: ${sdk.content-path}/**
|
||||
order: 0
|
||||
- client:
|
||||
system-code: business-safety-eval-container
|
||||
name: 资质评估
|
||||
group-code: public_api
|
||||
service:
|
||||
system-code: test-business-safety-eval-container
|
||||
name: 资质评估
|
||||
group-code: public_api
|
||||
strip-prefix: 0
|
||||
uri: ${common.uris.jjb-saas-base}
|
||||
path: ${sdk.content-path}/container/**
|
||||
order: -1
|
||||
swagger:
|
||||
enabled: ${common.swagger.enabled}
|
||||
title: 接口中心
|
||||
description: 接口中心,一切皆有可能
|
||||
version: 1.0.0
|
||||
group-name: 接口中心
|
||||
springfox:
|
||||
documentation:
|
||||
swagger-ui:
|
||||
base-url: safety-eval
|
||||
swagger:
|
||||
v2:
|
||||
path: ${sdk.content-path}/v2/api-docs
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath*:mapper/**/*.xml
|
||||
global-config:
|
||||
db-config:
|
||||
id-type: assign_id
|
||||
logic-delete-field: deleteEnum
|
||||
logic-delete-value: "true"
|
||||
logic-not-delete-value: "false"
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
# ---------- 文件存储(阿里云 OSS) ----------
|
||||
dromara:
|
||||
x-file-storage:
|
||||
default-platform: aliyun-oss-1
|
||||
thumbnail-suffix: "" # 不使用缩略图
|
||||
aliyun-oss:
|
||||
- platform: aliyun-oss-1
|
||||
enable-storage: true
|
||||
access-key: LTAI5tFerUgBCLEbXtinDD6d
|
||||
secret-key: XyGVNV2RvW8U3ceoJDiy9A9oLvCGYp
|
||||
end-point: oss-cn-hangzhou.aliyuncs.com
|
||||
bucket-name: test-dragon-yf-pub
|
||||
domain: https://test-dragon-yf-pub.oss-cn-hangzhou.aliyuncs.com/
|
||||
base-path: jjb/
|
||||
scriptTypeId: 1720337514125246464
|
||||
tenantId: 1733372006240944128
|
||||
|
||||
template:
|
||||
workTemplate: https://test-dragon-yf-pub.oss-cn-hangzhou.aliyuncs.com/jjb/2026/5/13/a27e808162ea4fa4a00bd3f6093c671f.docx
|
||||
|
||||
approve:
|
||||
saas:
|
||||
callBack: ${common.gateway.network.http.external}${sdk.content-path}/api/flow/callback
|
||||
|
||||
exam:
|
||||
# 考试成绩回调地址
|
||||
scoreUrl: http://10.43.82.219/safety-eval/api/exam/plan/callback/batch/score
|
||||
|
||||
|
||||
pay:
|
||||
#底座支付
|
||||
appId: yjzfd0001
|
||||
merchantNum: merchant000002
|
||||
saasUrl:
|
||||
#支付回调地址
|
||||
notify: ${common.gateway.network.http.external}/${sdk.content-path}/api/pay/order/callback
|
||||
#退款回调地址
|
||||
refundNotify: ${common.gateway.network.http.external}/${sdk.content-path}/api/pay/refund/callback
|
||||
# 特种理论
|
||||
# itemCodeTheory: "04000018"
|
||||
itemCodeTheory: "01000065"
|
||||
# 特种实操
|
||||
# itemCodeOperate: "04000018"
|
||||
itemCodeOperate: "01000066"
|
||||
opens:
|
||||
sdk:
|
||||
- name: isv
|
||||
protocol: ${common.open.sdk.protocol}
|
||||
url: ${common.open.sdk.url}
|
||||
appKey: ${common.apps.jjb-saas-safety-eval}
|
||||
appSecret: c09f8118-d939-4cfc-a919-9360f910aea4
|
||||
openPublicKey: 3059301306072a8648ce3d020106082a811ccf5501822d0342000464007d7291f02a41c09bb67a141988ead4ad8a66259600e7f3f131c6930199df3fd6e52188fcfde444456b849ec81f88eae2f9637cc4c73a6352ce4f7de6b315
|
||||
appPublicKey: ${common.open.sdk.appPublicKey}
|
||||
appPrivateKey: ${common.open.sdk.appPrivateKey}
|
||||
|
||||
|
||||
services:
|
||||
pay:
|
||||
#底座支付
|
||||
appId: yjzfd0001
|
||||
merchantNum: merchant000002
|
||||
#支付回调地址
|
||||
notify: ${common.uris.jjb-saas-safety-eval}${sdk.content-path}/api/callback/order/callback
|
||||
#退款回调地址
|
||||
refundNotify: ${common.uris.jjb-saas-safety-eval}${sdk.content-path}/callback/pay/refund/callback
|
||||
sign:
|
||||
notify: ${common.uris.jjb-saas-safety-eval}${sdk.content-path}/api/callback/sign/callback
|
||||
applyCert: ${common.uris.jjb-saas-safety-eval}${sdk.content-path}/api/callback/apply/cert/sign
|
||||
applyCertStamp: ${common.uris.jjb-saas-safety-eval}${sdk.content-path}/api/callback/apply/cert/sign/stamp
|
||||
applyCertStampSceneCode: affairs_apply_cert_sign
|
||||
exam:
|
||||
score: ${common.uris.jjb-saas-safety-eval}${sdk.content-path}/api/callback/exam/score
|
||||
cert:
|
||||
send: ${common.uris.jjb-saas-safety-eval}${sdk.content-path}/api/callback/cert/send
|
||||
enrollment:
|
||||
expire:
|
||||
months: 36
|
||||
|
||||
selfBuilt:
|
||||
code: 01FM06,02FM06,01FM05,02FM05,01FM04,02FM04
|
||||
name: 主要负责人:采掘施工,安全生产管理人员:采掘施工,主要负责人:地质勘探,安全生产管理人员:地质勘探,主要负责人:尾矿库,安全生产管理人员:尾矿库
|
||||
|
||||
ticket:
|
||||
detailInfo:
|
||||
url: ${common.gateway.network.http.external}/safety-eval/container/certificateView?id=
|
||||
qrCode:
|
||||
url: ${common.gateway.network.http.external}/official-website-h5/container/examTicket?type=mp&id=
|
||||
meituan:
|
||||
url: https://i.meituan.com/awp/h5/hotel/search/search.html
|
||||
|
||||
department:
|
||||
open: true
|
||||
|
||||
todo:
|
||||
payUrl: /cqyj/exam/myExam
|
||||
myExamUrl: /cqyj/exam/myExam
|
||||
theoryFeeUrl: /cqyj/exam/myExam
|
||||
theoryEnrollUrl: /cqyj/exam/myExam
|
||||
theoryExamUrl: /cqyj/exam/myExam
|
||||
theoryRetakeEnrollUrl: /cqyj/exam/myExam
|
||||
theoryRetakeExamUrl: /cqyj/exam/myExam
|
||||
operateFeeUrl: /cqyj/exam/myExam
|
||||
operateEnrollUrl: /cqyj/exam/myExam
|
||||
operateExamUrl: /cqyj/exam/myExam
|
||||
operateRetakeEnrollUrl: /cqyj/exam/myExam
|
||||
operateRetakeExamUrl: /cqyj/exam/myExam
|
||||
sendTicket: /cqyj/exam/examTicket?id=
|
||||
|
||||
baidu:
|
||||
appId: 26756657
|
||||
apiKey: IzqhAuOF90cGRlHMFAI92xAM
|
||||
secretKey: kPFNPgLoPj68sytuBlIFAouFH9DijMMm
|
||||
imageType: URL
|
||||
groupId:
|
||||
matchScore: 70
|
||||
registerFaceDatabase: TRUE
|
||||
user:
|
||||
rate:
|
||||
limit:
|
||||
enabled: true
|
||||
face:
|
||||
groupId: jjb_user_face_group_test
|
||||
|
||||
|
||||
guest:
|
||||
rate:
|
||||
limit:
|
||||
start: '00:00'
|
||||
end: '02:59'
|
||||
enabled: true
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
compare:
|
||||
url: ${common.gateway.network.http.external}/safety-eval/container/certificateView?compareId=
|
||||
|
||||
order:
|
||||
timeout:
|
||||
mius: 30
|
||||
|
||||
|
||||
expire:
|
||||
special:
|
||||
# 特征有效期截+12个月内可以报名
|
||||
after: 12
|
||||
nonspecial:
|
||||
# 特征有效期截内可以报名
|
||||
after: 0
|
||||
|
||||
special:
|
||||
review:
|
||||
municipal:
|
||||
percentage: 2
|
||||
|
||||
# ---------- Dubbo(环境无关的公共部分,各profile覆盖地址/端口) ----------
|
||||
dubbo:
|
||||
application:
|
||||
name: safety-eval-service
|
||||
service-discovery:
|
||||
migration: FORCE_INTERFACE
|
||||
registry:
|
||||
timeout: 20000
|
||||
check: false
|
||||
filter: providerContextFilter
|
||||
scan:
|
||||
base-packages: org.qinan.safetyeval
|
||||
protocol:
|
||||
name: dubbo
|
||||
consumer:
|
||||
timeout: 20000
|
||||
check: false
|
||||
filter: consumerContextFilter
|
||||
|
||||
safety-eval:
|
||||
gbs-user-sync:
|
||||
fail-fast: true
|
||||
user-facade-url: ${GBS_USER_FACADE_URL:}
|
||||
security:
|
||||
# Exact paths that can be accessed without authentication.
|
||||
permit-all-paths:
|
||||
- /v2/api-docs
|
||||
- /v3/api-docs
|
||||
# A prefix automatically matches itself and all child paths.
|
||||
permit-all-prefixes:
|
||||
- /swagger-ui
|
||||
- /swagger-resources
|
||||
- /webjars
|
||||
- /public
|
||||
- /test
|
||||
- /tmp
|
||||
- /mock
|
||||
# These rules take priority over permit-all rules when paths overlap.
|
||||
authenticated-paths: []
|
||||
authenticated-prefixes: []
|
||||
public-api:
|
||||
system-user-id: ${PUBLIC_API_SYSTEM_USER_ID:0}
|
||||
system-user-name: ${PUBLIC_API_SYSTEM_USER_NAME:system}
|
||||
tenant-id: ${PUBLIC_API_TENANT_ID:0}
|
||||
org-id: ${PUBLIC_API_ORG_ID:0}
|
||||
attachment:
|
||||
default-url: https://s1.aigei.com/prevfiles/6f2754563be2491bad7c957904cd7d2a.jpg?e=2051020800&token=P7S2Xpzfz11vAkASLTkfHN7Fw-oOZBecqeJaxypL:CR60zg7VKDp-jUWyYls_rdvyQMM=
|
||||
|
|
|
|||
|
|
@ -1,15 +1,74 @@
|
|||
# =============================================
|
||||
# [已废弃] 此文件不再生效
|
||||
# =============================================
|
||||
# 原因: 项目未引入 spring-cloud-starter-bootstrap 依赖,
|
||||
# Spring Cloud 2021.x 默认不加载 bootstrap 上下文。
|
||||
#
|
||||
# 已迁移至:
|
||||
# - application-{profile}.yml → Nacos 连接信息与 spring.config.import
|
||||
#
|
||||
# 如需恢复 bootstrap 机制,请在 safety-eval-start/pom.xml 中添加:
|
||||
# <dependency>
|
||||
# <groupId>org.springframework.cloud</groupId>
|
||||
# <artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
# </dependency>
|
||||
# =============================================
|
||||
application:
|
||||
name: jjb-saas-safety-eval
|
||||
version:
|
||||
gateway: safety-eval
|
||||
nacos:
|
||||
# 开发nacos环境
|
||||
# url: 10.43.105.171:80
|
||||
# namespace: jjb-saas-dev
|
||||
# dev nacos环境
|
||||
# url: 10.43.139.74:8848
|
||||
# namespace: jjb-dragon
|
||||
# uat 环境
|
||||
url: 192.168.20.100:30290
|
||||
namespace: jjb-dragon
|
||||
spring:
|
||||
application:
|
||||
name: ${application.name}
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: test
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
namespace: ${nacos.namespace}
|
||||
server-addr: ${nacos.url}
|
||||
file-extension: yml
|
||||
shared-configs:
|
||||
- config-port.yml
|
||||
- config-common.yml
|
||||
- config-mq.yml
|
||||
- config-log.yml
|
||||
- config-job.yml
|
||||
- config-actuator.yml
|
||||
- config-mysql.yml
|
||||
- config-redis.yml
|
||||
- config-cache.yml
|
||||
- config-spring.yml
|
||||
- config-mybatis.yml
|
||||
- config-sdk.yml
|
||||
- config-common.yml
|
||||
discovery:
|
||||
# ip: 192.168.3.126
|
||||
# port: 80
|
||||
server-addr: ${spring.cloud.nacos.config.server-addr}
|
||||
namespace: ${spring.cloud.nacos.config.namespace}
|
||||
openapi:
|
||||
appId: 1852172886036910080
|
||||
appKey: 2ea51819fc354088bf02d11effd1bd08
|
||||
appSecret: d5c266c0-3440-480c-8390-65b772238aac
|
||||
appPublicKey: 0490713158a22073896b9f3e79726eaac5e5a432cfc9c5512e86f856e307989625e29c6760462ed61c9328045e6d72223dfdc3dede5ae8ac44af3707c3d48ccb15
|
||||
appPrivateKey: 308193020100301306072a8648ce3d020106082a811ccf5501822d047930770201010420079dce3b32004ec5694f096b431e1e41f17af8ec412ca81990169db195e9bb1ba00a06082a811ccf5501822da1440342000490713158a22073896b9f3e79726eaac5e5a432cfc9c5512e86f856e307989625e29c6760462ed61c9328045e6d72223dfdc3dede5ae8ac44af3707c3d48ccb15
|
||||
encryptType: SM2
|
||||
platform:
|
||||
- name: default
|
||||
openPublicKey: 3059301306072a8648ce3d020106082a811ccf5501822d03420004639a7ca9a33cafb69c65ed36f1edc0a092c79c33df84accc10b19067553a2684856e59b6835c96801433069a8092cfb1c5ebe8d4df09a0ea3fb29b9c436b9358
|
||||
url: ${common.openapi.url}
|
||||
protocol: HTTP
|
||||
defaultPlatform: true
|
||||
# type: plaintext
|
||||
type: ciphertext
|
||||
|
||||
limit:
|
||||
limiter:
|
||||
- appKey: 1
|
||||
apiCode: 2
|
||||
limitNum: 10
|
||||
seconds: 1
|
||||
init: true
|
||||
limitNum: 10
|
||||
seconds: 1
|
||||
message: 操作频繁,请稍后再试!
|
||||
|
||||
# 租户类型id 创建子机构及管理员账号使用
|
||||
tenantTypeId: 1729391725501349889
|
||||
Loading…
Reference in New Issue