1.解决冀北阿里云Nacos版本兼容问题

2.解决配置bootstrap.yml兼容问题
This commit is contained in:
wr
2026-04-02 10:40:11 +08:00
parent 7b9fb1628b
commit 1aad1aa86b
42 changed files with 1753 additions and 895 deletions

View File

@@ -39,6 +39,7 @@
</snapshotRepository>
</distributionManagement>
<properties>
<spring.profiles.active>sjzx</spring.profiles.active>
<!--中间件目标地址-->
<!-- <middle.server.url>10.95.53.49</middle.server.url>-->
<middle.server.url>192.168.1.103</middle.server.url>

View File

@@ -0,0 +1,56 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10211
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
server-addr: @nacos.url@
namespace: @nacos.namespace@
config:
username: @nacos.username@
password: @nacos.password@
server-addr: @nacos.url@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
main:
allow-bean-definition-overriding: true
#项目日志的配置
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.advance.pojo

View File

@@ -0,0 +1,61 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10211
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
main:
allow-bean-definition-overriding: true
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.advance.pojo
mqtt:
client-id: @artifactId@${random.value}

View File

@@ -1,61 +1,3 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10211
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
main:
allow-bean-definition-overriding: true
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.advance.pojo
mqtt:
client-id: @artifactId@${random.value}
profiles:
active: sjzx

View File

@@ -0,0 +1,52 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10214
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
server-addr: @nacos.url@
namespace: @nacos.namespace@
config:
username: @nacos.username@
password: @nacos.password@
server-addr: @nacos.url@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
#项目日志的配置
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.user.pojo

View File

@@ -0,0 +1,57 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10214
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.user.pojo
mqtt:
client-id: @artifactId@${random.value}

View File

@@ -1,57 +1,3 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10214
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.user.pojo
mqtt:
client-id: @artifactId@${random.value}
profiles:
active: @spring.profiles.active@

View File

@@ -0,0 +1,71 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10321
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: Asia/Shanghai
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
server-addr: @nacos.url@
namespace: @nacos.namespace@
config:
username: @nacos.username@
password: @nacos.password@
server-addr: @nacos.url@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
flowable:
database-schema-update: false
db-history-used: true # flowable6 默认 true 生成信息表,无需手动设置
check-process-definitions: false # 设置为 false禁用 /resources/processes 自动部署 BPMN XML 流程
history-level: full # full保存历史数据的最高级别可保存全部流程相关细节包括流程流转各节点参数
async-executor-activate: false
#项目日志的配置
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
type-aliases-package: com.njcn.bpm.pojo
gw:
url: dwzyywzt-pms3-proxy.com
code: 13B9B47F1E483324E05338297A0A0595

View File

@@ -0,0 +1,76 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10321
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: Asia/Shanghai
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
namespace: @nacos.namespace@
username: @nacos.username@
password: @nacos.password@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: bpm-config.yaml
refresh: true
main:
allow-bean-definition-overriding: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
flowable:
database-schema-update: false
db-history-used: true # flowable6 默认 true 生成信息表,无需手动设置
check-process-definitions: false # 设置为 false禁用 /resources/processes 自动部署 BPMN XML 流程
history-level: full # full保存历史数据的最高级别可保存全部流程相关细节包括流程流转各节点参数
async-executor-activate: false
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
type-aliases-package: com.njcn.bpm.pojo
gw:
url: dwzyywzt-pms3-proxy.com
code: 13B9B47F1E483324E05338297A0A0595
mqtt:
client-id: @artifactId@${random.value}

View File

@@ -1,76 +1,3 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10321
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: Asia/Shanghai
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
namespace: @nacos.namespace@
username: @nacos.username@
password: @nacos.password@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: bpm-config.yaml
refresh: true
main:
allow-bean-definition-overriding: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
flowable:
database-schema-update: false
db-history-used: true # flowable6 默认 true 生成信息表,无需手动设置
check-process-definitions: false # 设置为 false禁用 /resources/processes 自动部署 BPMN XML 流程
history-level: full # full保存历史数据的最高级别可保存全部流程相关细节包括流程流转各节点参数
async-executor-activate: false
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
type-aliases-package: com.njcn.bpm.pojo
gw:
url: dwzyywzt-pms3-proxy.com
code: 13B9B47F1E483324E05338297A0A0595
mqtt:
client-id: @artifactId@${random.value}
profiles:
active: @spring.profiles.active@

View File

@@ -1,5 +1,7 @@
package com.njcn.microservice.listener;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.joran.JoranConfigurator;
import org.slf4j.LoggerFactory;
@@ -34,33 +36,46 @@ public class NacosLogbackConfigLoader implements SpringApplicationRunListener, A
@Override
public void environmentPrepared(ConfigurableEnvironment environment) {
String serverAddr = environment.getProperty("spring.cloud.nacos.config.server-addr");
String namespace = environment.getProperty("spring.cloud.nacos.config.namespace");
String projectName = environment.getProperty("microservice.ename");
String logLevel = environment.getProperty("logging.level.root");
String url = String.format("http://%s/nacos/v1/cs/configs?tenant=%s&group=DEFAULT_GROUP&dataId=logback.xml", serverAddr, namespace);
HttpHeaders headers = new HttpHeaders();
headers.set("cndl408125hawen", "lanxia201");
HttpEntity<String> entity = new HttpEntity<>(headers);
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<String> response = restTemplate.exchange(url, HttpMethod.GET, entity, String.class);
if (response.getStatusCode().is2xxSuccessful()) {
String logbackConfigContent = response.getBody();
//替换项目名称
logbackConfigContent = logbackConfigContent.replace("projectDefaultName",projectName);
logbackConfigContent = logbackConfigContent.replace("logDefaultLevel",logLevel);
// 应用获取到的Logback配置
applyLogbackConfig(logbackConfigContent);
String active = environment.getProperty("spring.profiles.active");
if(!"jb".equalsIgnoreCase(active)){
String serverAddr = environment.getProperty("spring.cloud.nacos.config.server-addr");
String namespace = environment.getProperty("spring.cloud.nacos.config.namespace");
String projectName = environment.getProperty("microservice.ename");
String logLevel = environment.getProperty("logging.level.root");
String url = String.format("http://%s/nacos/v1/cs/configs?tenant=%s&group=DEFAULT_GROUP&dataId=logback.xml", serverAddr, namespace);
HttpHeaders headers = new HttpHeaders();
headers.set("cndl408125hawen", "lanxia201");
HttpEntity<String> entity = new HttpEntity<>(headers);
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<String> response = restTemplate.exchange(url, HttpMethod.GET, entity, String.class);
if (response.getStatusCode().is2xxSuccessful()) {
String logbackConfigContent = response.getBody();
//替换项目名称
logbackConfigContent = logbackConfigContent.replace("projectDefaultName",projectName);
logbackConfigContent = logbackConfigContent.replace("logDefaultLevel",logLevel);
// 应用获取到的Logback配置
applyLogbackConfig(logbackConfigContent,logLevel);
}
}
}
private void applyLogbackConfig(String logbackConfigContent) {
private void applyLogbackConfig(String logbackConfigContent,String logLevel) {
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
JoranConfigurator configurator = new JoranConfigurator();
configurator.setContext(context);
context.reset();
try (ByteArrayInputStream inputStream = new ByteArrayInputStream(logbackConfigContent.getBytes(StandardCharsets.UTF_8))) {
configurator.doConfigure(inputStream);
Logger root = context.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
if("debug".equalsIgnoreCase(logLevel)){
root.setLevel(Level.DEBUG);
}
if("info".equalsIgnoreCase(logLevel)){
root.setLevel(Level.INFO);
}
if("error".equalsIgnoreCase(logLevel)){
root.setLevel(Level.ERROR);
}
} catch (Exception e) {
e.printStackTrace();
}

View File

@@ -1,6 +1,6 @@
package com.njcn.mq.template;
import com.alibaba.nacos.shaded.com.google.gson.Gson;
import com.alibaba.fastjson.JSON;
import com.njcn.middle.rocket.domain.BaseMessage;
import com.njcn.middle.rocket.template.RocketMQEnhanceTemplate;
import com.njcn.mq.constant.BusinessResource;
@@ -25,7 +25,7 @@ public class BZEventMessageTemplate extends RocketMQEnhanceTemplate {
public SendResult sendMember(Object message, String tag) {
BaseMessage baseMessage = new BaseMessage();
baseMessage.setSource(BusinessResource.WEB_RESOURCE);
baseMessage.setMessageBody(new Gson().toJson(message));
baseMessage.setMessageBody(JSON.toJSONString(message));
return send(BusinessTopic.ASK_RECALL_TOPIC,tag,baseMessage);
}
}

View File

@@ -1,6 +1,6 @@
package com.njcn.mq.template;
import com.alibaba.nacos.shaded.com.google.gson.Gson;
import com.google.gson.Gson;
import com.njcn.middle.rocket.domain.BaseMessage;
import com.njcn.middle.rocket.template.RocketMQEnhanceTemplate;
import com.njcn.mq.constant.BusinessResource;

View File

@@ -1,6 +1,6 @@
package com.njcn.mq.template;
import com.alibaba.nacos.shaded.com.google.gson.Gson;
import com.google.gson.Gson;
import com.njcn.middle.rocket.domain.BaseMessage;
import com.njcn.middle.rocket.template.RocketMQEnhanceTemplate;
import com.njcn.mq.constant.BusinessResource;

View File

@@ -1,6 +1,6 @@
package com.njcn.mq.template;
import com.alibaba.nacos.shaded.com.google.gson.Gson;
import com.google.gson.Gson;
import com.njcn.middle.rocket.domain.BaseMessage;
import com.njcn.middle.rocket.template.RocketMQEnhanceTemplate;
import com.njcn.mq.constant.BusinessResource;

View File

@@ -0,0 +1,67 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10202
max-http-header-size: 1048576
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
server-addr: @nacos.url@
namespace: @nacos.namespace@
config:
username: @nacos.username@
password: @nacos.password@
server-addr: @nacos.url@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-Id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
servlet:
multipart:
#上传文件总的最大值
max-request-size: 200MB
#上传文件的最大值
max-file-size: 200MB
#项目日志的配置
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.device.pq.pojo,com.njcn.device.pms.pojo,com.njcn.device.biz.pojo.dto
#是否是冀北设备台账树
isJb: false
oracle:
isSync: false
syncLedgerLineUrl: http://localhost:8082/export/syncLedgerLine
syncLedgerUpdateLine: http://localhost:8082/export/syncLedgerUpdateLine
syncLedgerDeleteLine: http://localhost:8082/export/syncLedgerDeleteLine

View File

@@ -0,0 +1,72 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10202
max-http-header-size: 1048576
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
servlet:
multipart:
#上传文件总的最大值
max-request-size: 200MB
#上传文件的最大值
max-file-size: 200MB
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.device.pq.pojo,com.njcn.device.pms.pojo,com.njcn.device.biz.pojo.dto
#是否是冀北设备台账树
isJb: false
mqtt:
client-id: @artifactId@${random.value}
oracle:
isSync: false
syncLedgerLineUrl: http://localhost:8082/export/syncLedgerLine
syncLedgerUpdateLine: http://localhost:8082/export/syncLedgerUpdateLine
syncLedgerDeleteLine: http://localhost:8082/export/syncLedgerDeleteLine

View File

@@ -1,72 +1,3 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10202
max-http-header-size: 1048576
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
servlet:
multipart:
#上传文件总的最大值
max-request-size: 200MB
#上传文件的最大值
max-file-size: 200MB
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.device.pq.pojo,com.njcn.device.pms.pojo,com.njcn.device.biz.pojo.dto
#是否是冀北设备台账树
isJb: false
mqtt:
client-id: @artifactId@${random.value}
oracle:
isSync: false
syncLedgerLineUrl: http://localhost:8082/export/syncLedgerLine
syncLedgerUpdateLine: http://localhost:8082/export/syncLedgerUpdateLine
syncLedgerDeleteLine: http://localhost:8082/export/syncLedgerDeleteLine
profiles:
active: @spring.profiles.active@

View File

@@ -3,6 +3,7 @@ package com.njcn.device.pq.pojo.vo.dataClean;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
@@ -72,6 +73,12 @@ public class DataVerifyExcel implements Serializable {
@Excel(name = "厂商")
private String manufacturer;
@ColumnWidth(20)
@ExcelProperty(value = "电网标志")
@Excel(name = "电网标志")
@ApiModelProperty(name = "powerFlag",value = "电网标志")
private String powerFlag;
@ColumnWidth(20)
@ExcelProperty(value = "总指标异常时间")
@Excel(name = "总指标异常时间")

View File

@@ -1,8 +1,8 @@
package com.njcn.device.pq.utils;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.util.ObjUtil;
import com.alibaba.nacos.shaded.com.google.common.collect.Lists;
import com.njcn.device.pq.pojo.vo.dataClean.CityDataExcel;
import com.njcn.device.pq.pojo.vo.dataClean.LineDataExcel;
@@ -49,7 +49,7 @@ public class DataLineExcelUtil {
List<List<Object>> result = new ArrayList<>();
if(CollUtil.isNotEmpty(data)){
for (LineDataExcel datum : data) {
ArrayList<Object> row = Lists.newArrayList(datum.getLineNum(),
ArrayList<Object> row = ListUtil.toList(datum.getLineNum(),
datum.getLineName(),
datum.getDeptName(),
datum.getPowerSubstationName(),
@@ -89,7 +89,7 @@ public class DataLineExcelUtil {
List<List<Object>> result = new ArrayList<>();
if(CollUtil.isNotEmpty(data)){
for (CityDataExcel datum : data) {
ArrayList<Object> row = Lists.newArrayList(datum.getDeptName(),
ArrayList<Object> row = ListUtil.toList(datum.getDeptName(),
datum.getDeviceNum(),
datum.getLineNum(),
datum.getOnlineRate(),

View File

@@ -132,8 +132,9 @@ public class FixedDynamicExcelExport {
head.add(Collections.singletonList("监测对象名称"));
head.add(Collections.singletonList("电网侧变电站"));
head.add(Collections.singletonList("厂商"));
head.add(Collections.singletonList("电网标志"));
head.add(Collections.singletonList("总指标异常时间"));
List<String> sortedFields = allFields.subList(10, allFields.size());
List<String> sortedFields = allFields.subList(11, allFields.size());
for (String field : sortedFields) {
// 每个列名单独封装成ListEasyExcel才能识别为不同列
head.add(Collections.singletonList(DataVerifyExcel.FIELD_COLUMN_MAP.get(field)));
@@ -209,6 +210,7 @@ public class FixedDynamicExcelExport {
fieldAlls.add("objName");
fieldAlls.add("powerSubstationName");
fieldAlls.add("manufacturer");
fieldAlls.add("powerFlag");
fieldAlls.add("allTime");
fieldAlls.addAll(fields);
return fieldAlls;

View File

@@ -2,6 +2,7 @@ package com.njcn.device.pq.controller;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
@@ -156,8 +157,10 @@ public class DataVerifyController extends BaseController {
public void dataVerifyExcel(HttpServletResponse response, MonitorBaseParam monitorBaseParam) throws IOException {
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
monitorBaseParam.setSearchBeginTime(DateUtil.beginOfDay(DateUtil.parse(monitorBaseParam.getSearchBeginTime())).toString());
monitorBaseParam.setSearchEndTime(DateUtil.endOfDay(DateUtil.parse(monitorBaseParam.getSearchEndTime())).toString());
if(StrUtil.isNotBlank(monitorBaseParam.getSearchBeginTime())&&StrUtil.isNotBlank(monitorBaseParam.getSearchEndTime())){
monitorBaseParam.setSearchBeginTime(DateUtil.beginOfDay(DateUtil.parse(monitorBaseParam.getSearchBeginTime())).toString());
monitorBaseParam.setSearchEndTime(DateUtil.endOfDay(DateUtil.parse(monitorBaseParam.getSearchEndTime())).toString());
}
iPqDataVerifyBakService.dataVerifyExcel(response, monitorBaseParam);
}

View File

@@ -195,7 +195,7 @@ public class PqDataVerifyBakServiceImpl extends ServiceImpl<PqDataVerifyBakMappe
@Override
public List<PowerQualityIndicatorsVO> getMonitorVerifyDay(MonitorBaseParam monitorBaseParam) {
List<String> monitorIds = commTerminalService.getRunMonitorByDept(monitorBaseParam);
if(CollectionUtils.isEmpty(monitorIds)){
if (CollectionUtils.isEmpty(monitorIds)) {
return new ArrayList<>();
}
List<PqDataVerifyBak> dataVerifyList = baseDataVerifyQuery(monitorIds, monitorBaseParam);
@@ -435,6 +435,7 @@ public class PqDataVerifyBakServiceImpl extends ServiceImpl<PqDataVerifyBakMappe
dataVerifyExcel.setPowerSubstationName(areaLineInfoVO.getPowerSubstationName());
dataVerifyExcel.setDevName(areaLineInfoVO.getDeviceName());
dataVerifyExcel.setIp(areaLineInfoVO.getIp());
dataVerifyExcel.setPowerFlag(areaLineInfoVO.getPowerFlag() == 0 ? "电网侧" : "非电网侧");
dataVerifyExcel.setManufacturer(areaLineInfoVO.getManufacturer());
}
}

View File

@@ -0,0 +1,48 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10203
max-http-header-size: 1048576
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
server-addr: @nacos.url@
namespace: @nacos.namespace@
config:
username: @nacos.username@
password: @nacos.password@
server-addr: @nacos.url@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
#项目日志的配置
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
type-aliases-package: com.njcn.event.pojo

View File

@@ -0,0 +1,52 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10203
max-http-header-size: 1048576
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
type-aliases-package: com.njcn.event.pojo
mqtt:
client-id: @artifactId@${random.value}

View File

@@ -1,52 +1,3 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10203
max-http-header-size: 1048576
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
type-aliases-package: com.njcn.event.pojo
mqtt:
client-id: @artifactId@${random.value}
profiles:
active: @spring.profiles.active@

View File

@@ -1,10 +1,10 @@
package com.njcn.gateway.filter;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.alibaba.nacos.common.utils.CollectionUtils;
import com.nimbusds.jose.JWSObject;
import com.njcn.common.pojo.constant.SecurityConstants;
import com.njcn.common.pojo.dto.UserTokenInfo;
@@ -82,7 +82,7 @@ public class AuthGlobalFilter implements GlobalFilter, Ordered {
}
String blackUserKey = SecurityConstants.TOKEN_BLACKLIST_PREFIX + userIndex;
List<UserTokenInfo> blackUsers = (List<UserTokenInfo>) redisUtil.getObjectByKey(blackUserKey);
if (CollectionUtils.isNotEmpty(blackUsers)) {
if (CollUtil.isNotEmpty(blackUsers)) {
for (UserTokenInfo blackUser : blackUsers) {
//存在当前的刷新token则抛出业务异常
if(blackUser.getAccessTokenJti().equalsIgnoreCase(jti)){

View File

@@ -0,0 +1,274 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: "@name@"
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10215
spring:
application:
name: @artifactId@
main:
allow-bean-definition-overriding: true
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
server-addr: @nacos.url@
namespace: @nacos.namespace@
config:
username: @nacos.username@
password: @nacos.password@
server-addr: @nacos.url@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
gateway:
globalcors:
corsConfigurations:
'[/**]':
allowCredentials: true
exposedHeaders: "Content-Disposition,Content-Type,Cache-Control"
allowedHeaders: "*"
allowedOrigins: "*"
allowedMethods: "*"
discovery:
locator:
# 开启自动代理 (自动装载从配置中心serviceId)
enabled: true
# 服务id为true --> 这样小写服务就可访问了
lower-case-service-id: true
routes:
- id: pqs-auth
uri: lb://pqs-auth
predicates:
- Path=/pqs-auth/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: user-boot
uri: lb://user-boot
predicates:
- Path=/user-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: device-boot
uri: lb://device-boot
predicates:
- Path=/device-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: system-boot
uri: lb://system-boot
predicates:
- Path=/system-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: harmonic-boot
uri: lb://harmonic-boot
predicates:
- Path=/harmonic-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: energy-boot
uri: lb://energy-boot
predicates:
- Path=/energy-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: event-boot
uri: lb://event-boot
predicates:
- Path=/event-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: quality-boot
uri: lb://quality-boot
predicates:
- Path=/quality-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: harmonic-prepare
uri: lb://harmonic-prepare
predicates:
- Path=/harmonic-prepare/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: process-boot
uri: lb://process-boot
predicates:
- Path=/process-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: prepare-boot
uri: lb://prepare-boot
predicates:
- Path=/prepare-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: algorithm-boot
uri: lb://algorithm-boot
predicates:
- Path=/algorithm-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: access-boot
uri: lb://access-boot
predicates:
- Path=/access-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-device-boot
uri: lb://cs-device-boot
predicates:
- Path=/cs-device-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-system-boot
uri: lb://cs-system-boot
predicates:
- Path=/cs-system-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-warn-boot
uri: lb://cs-warn-boot
predicates:
- Path=/cs-warn-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-harmonic-boot
uri: lb://cs-harmonic-boot
predicates:
- Path=/cs-harmonic-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: advance-boot
uri: lb://advance-boot
predicates:
- Path=/advance-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: bpm-boot
uri: lb://bpm-boot
predicates:
- Path=/bpm-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: supervision-boot
uri: lb://supervision-boot
predicates:
- Path=/supervision-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-report-boot
uri: lb://cs-report-boot
predicates:
- Path=/cs-report-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
#冀北influxDB转换程序
- id: migration-influxdb-read-boot
uri: lb://migration-influxdb-read-boot
predicates:
- Path=/migration-influxdb-read-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
#项目日志的配置
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
whitelist:
urls:
- /user-boot/user/generateSm2Key
- /user-boot/theme/getTheme
- /user-boot/user/updateFirstPassword
- /user-boot/appUser/authCode
- /user-boot/appUser/register
- /user-boot/appUser/resetPsd
- /pqs-auth/oauth/logout
- /pqs-auth/oauth/token
- /pqs-auth/oauth/autoLogin
- /pqs-auth/auth/getImgCode
- /pqs-auth/oauth/getPublicKey
- /pqs-auth/judgeToken/heBei
- /pqs-auth/judgeToken/guangZhou
- /webjars/**
- /actuator/**
- /doc.html
- /swagger-resources/**
- /*/v2/api-docs
- /favicon.ico
- /system-boot/theme/getTheme
- /system-boot/image/toStream
- /system-boot/file/download
- /cs-system-boot/appinfo/queryAppInfoByType
- /system-boot/dictType/dictDataCache
- /system-boot/file/**
- /system-boot/area/**
- /bpm-boot/**
- /harmonic-boot/comAccess/getComAccessData
- /harmonic-boot/harmonic/getHistoryResult
- /event-boot/transient/getTransientAnalyseWave
# - /**
#开始
# - /advance-boot/**
# - /device-boot/**
# - /system-boot/**
# - /harmonic-boot/**
# - /energy-boot/**
# - /event-boot/**
# - /quality-boot/**
# - /harmonic-prepare/**
# - /process-boot/**
# - /bpm-boot/**
# - /system-boot/**
# - /supervision-boot/**
# - /user-boot/**
# - /harmonic-boot/**
# - /cs-device-boot/**
#结束
- /user-boot/user/listAllUserByDeptId
- /IndexAnalysis/**

View File

@@ -0,0 +1,279 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: "@name@"
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10215
spring:
application:
name: @artifactId@
main:
allow-bean-definition-overriding: true
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
gateway:
globalcors:
corsConfigurations:
'[/**]':
allowCredentials: true
exposedHeaders: "Content-Disposition,Content-Type,Cache-Control"
allowedHeaders: "*"
allowedOrigins: "*"
allowedMethods: "*"
discovery:
locator:
# 开启自动代理 (自动装载从配置中心serviceId)
enabled: true
# 服务id为true --> 这样小写服务就可访问了
lower-case-service-id: true
routes:
- id: pqs-auth
uri: lb://pqs-auth
predicates:
- Path=/pqs-auth/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: user-boot
uri: lb://user-boot
predicates:
- Path=/user-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: device-boot
uri: lb://device-boot
predicates:
- Path=/device-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: system-boot
uri: lb://system-boot
predicates:
- Path=/system-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: harmonic-boot
uri: lb://harmonic-boot
predicates:
- Path=/harmonic-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: energy-boot
uri: lb://energy-boot
predicates:
- Path=/energy-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: event-boot
uri: lb://event-boot
predicates:
- Path=/event-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: quality-boot
uri: lb://quality-boot
predicates:
- Path=/quality-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: harmonic-prepare
uri: lb://harmonic-prepare
predicates:
- Path=/harmonic-prepare/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: process-boot
uri: lb://process-boot
predicates:
- Path=/process-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: prepare-boot
uri: lb://prepare-boot
predicates:
- Path=/prepare-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: algorithm-boot
uri: lb://algorithm-boot
predicates:
- Path=/algorithm-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: access-boot
uri: lb://access-boot
predicates:
- Path=/access-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-device-boot
uri: lb://cs-device-boot
predicates:
- Path=/cs-device-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-system-boot
uri: lb://cs-system-boot
predicates:
- Path=/cs-system-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-warn-boot
uri: lb://cs-warn-boot
predicates:
- Path=/cs-warn-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-harmonic-boot
uri: lb://cs-harmonic-boot
predicates:
- Path=/cs-harmonic-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: advance-boot
uri: lb://advance-boot
predicates:
- Path=/advance-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: bpm-boot
uri: lb://bpm-boot
predicates:
- Path=/bpm-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: supervision-boot
uri: lb://supervision-boot
predicates:
- Path=/supervision-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-report-boot
uri: lb://cs-report-boot
predicates:
- Path=/cs-report-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
#冀北influxDB转换程序
- id: migration-influxdb-read-boot
uri: lb://migration-influxdb-read-boot
predicates:
- Path=/migration-influxdb-read-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
whitelist:
urls:
- /user-boot/user/generateSm2Key
- /user-boot/theme/getTheme
- /user-boot/user/updateFirstPassword
- /user-boot/appUser/authCode
- /user-boot/appUser/register
- /user-boot/appUser/resetPsd
- /pqs-auth/oauth/logout
- /pqs-auth/oauth/token
- /pqs-auth/oauth/autoLogin
- /pqs-auth/auth/getImgCode
- /pqs-auth/oauth/getPublicKey
- /pqs-auth/judgeToken/heBei
- /pqs-auth/judgeToken/guangZhou
- /webjars/**
- /actuator/**
- /doc.html
- /swagger-resources/**
- /*/v2/api-docs
- /favicon.ico
- /system-boot/theme/getTheme
- /system-boot/image/toStream
- /system-boot/file/download
- /cs-system-boot/appinfo/queryAppInfoByType
- /system-boot/dictType/dictDataCache
- /system-boot/file/**
- /system-boot/area/**
- /bpm-boot/**
- /harmonic-boot/comAccess/getComAccessData
- /harmonic-boot/harmonic/getHistoryResult
- /event-boot/transient/getTransientAnalyseWave
# - /**
#开始
# - /advance-boot/**
# - /device-boot/**
# - /system-boot/**
# - /harmonic-boot/**
# - /energy-boot/**
# - /event-boot/**
# - /quality-boot/**
# - /harmonic-prepare/**
# - /process-boot/**
# - /bpm-boot/**
# - /system-boot/**
# - /supervision-boot/**
# - /user-boot/**
# - /harmonic-boot/**
# - /cs-device-boot/**
#结束
- /user-boot/user/listAllUserByDeptId
- /IndexAnalysis/**
#mqtt:
# client-id: @artifactId@${random.value}

View File

@@ -1,277 +1,3 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: "@name@"
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10215
spring:
application:
name: @artifactId@
main:
allow-bean-definition-overriding: true
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
gateway:
globalcors:
corsConfigurations:
'[/**]':
allowCredentials: true
exposedHeaders: "Content-Disposition,Content-Type,Cache-Control"
allowedHeaders: "*"
allowedOrigins: "*"
allowedMethods: "*"
discovery:
locator:
# 开启自动代理 (自动装载从配置中心serviceId)
enabled: true
# 服务id为true --> 这样小写服务就可访问了
lower-case-service-id: true
routes:
- id: pqs-auth
uri: lb://pqs-auth
predicates:
- Path=/pqs-auth/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: user-boot
uri: lb://user-boot
predicates:
- Path=/user-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: device-boot
uri: lb://device-boot
predicates:
- Path=/device-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: system-boot
uri: lb://system-boot
predicates:
- Path=/system-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: harmonic-boot
uri: lb://harmonic-boot
predicates:
- Path=/harmonic-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: energy-boot
uri: lb://energy-boot
predicates:
- Path=/energy-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: event-boot
uri: lb://event-boot
predicates:
- Path=/event-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: quality-boot
uri: lb://quality-boot
predicates:
- Path=/quality-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: harmonic-prepare
uri: lb://harmonic-prepare
predicates:
- Path=/harmonic-prepare/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: process-boot
uri: lb://process-boot
predicates:
- Path=/process-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: prepare-boot
uri: lb://prepare-boot
predicates:
- Path=/prepare-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: algorithm-boot
uri: lb://algorithm-boot
predicates:
- Path=/algorithm-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: access-boot
uri: lb://access-boot
predicates:
- Path=/access-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-device-boot
uri: lb://cs-device-boot
predicates:
- Path=/cs-device-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-system-boot
uri: lb://cs-system-boot
predicates:
- Path=/cs-system-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-warn-boot
uri: lb://cs-warn-boot
predicates:
- Path=/cs-warn-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-harmonic-boot
uri: lb://cs-harmonic-boot
predicates:
- Path=/cs-harmonic-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: advance-boot
uri: lb://advance-boot
predicates:
- Path=/advance-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: bpm-boot
uri: lb://bpm-boot
predicates:
- Path=/bpm-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: supervision-boot
uri: lb://supervision-boot
predicates:
- Path=/supervision-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: cs-report-boot
uri: lb://cs-report-boot
predicates:
- Path=/cs-report-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
#河北国网总部调用省侧接口,路径总部统一规定
- id: hb_pms_down
uri: lb://harmonic-boot
predicates:
- Path=/IndexAnalysis/**
- Path=/pms-tech-powerquality-start/**
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
whitelist:
urls:
- /user-boot/user/generateSm2Key
- /user-boot/theme/getTheme
- /user-boot/user/updateFirstPassword
- /user-boot/appUser/authCode
- /user-boot/appUser/register
- /user-boot/appUser/resetPsd
- /pqs-auth/oauth/logout
- /pqs-auth/oauth/token
- /pqs-auth/oauth/autoLogin
- /pqs-auth/auth/getImgCode
- /pqs-auth/oauth/getPublicKey
- /pqs-auth/judgeToken/heBei
- /pqs-auth/judgeToken/guangZhou
- /webjars/**
- /actuator/**
- /doc.html
- /swagger-resources/**
- /*/v2/api-docs
- /favicon.ico
- /system-boot/theme/getTheme
- /system-boot/image/toStream
- /system-boot/file/download
- /cs-system-boot/appinfo/queryAppInfoByType
- /system-boot/dictType/dictDataCache
- /system-boot/file/**
- /system-boot/area/**
- /bpm-boot/**
- /harmonic-boot/comAccess/getComAccessData
- /harmonic-boot/harmonic/getHistoryResult
- /event-boot/transient/getTransientAnalyseWave
# - /**
#开始
# - /advance-boot/**
# - /device-boot/**
# - /system-boot/**
# - /harmonic-boot/**
# - /energy-boot/**
# - /event-boot/**
# - /quality-boot/**
# - /harmonic-prepare/**
# - /process-boot/**
# - /bpm-boot/**
# - /system-boot/**
# - /supervision-boot/**
# - /user-boot/**
# - /harmonic-boot/**
# - /cs-device-boot/**
#结束
- /user-boot/user/listAllUserByDeptId
- /IndexAnalysis/**
#mqtt:
# client-id: @artifactId@${random.value}
profiles:
active: @spring.profiles.active@

View File

@@ -0,0 +1,63 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10204
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
server-addr: @nacos.url@
namespace: @nacos.namespace@
config:
username: @nacos.username@
password: @nacos.password@
server-addr: @nacos.url@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
jackson:
time-zone: GMT+8
#项目日志的配置
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
type-aliases-package: com.njcn.harmonic.pojo
global-config:
enable-sql-runner: true

View File

@@ -0,0 +1,72 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10204
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
namespace: @nacos.namespace@
username: @nacos.username@
password: @nacos.password@
config:
server-addr: @nacos.url@
namespace: @nacos.namespace@
username: @nacos.username@
password: @nacos.password@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
#数据中心使用
- data-id: share-config-datasource-db.yaml
refresh: true
#PMS使用
# - data-Id: share-config-harmonic-db.yaml
# refresh: true
main:
allow-bean-definition-overriding: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
jackson:
time-zone: GMT+8
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
type-aliases-package: com.njcn.harmonic.pojo
global-config:
enable-sql-runner: true
mqtt:
client-id: @artifactId@${random.value}

View File

@@ -1,72 +1,3 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10204
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
namespace: @nacos.namespace@
username: @nacos.username@
password: @nacos.password@
config:
server-addr: @nacos.url@
namespace: @nacos.namespace@
username: @nacos.username@
password: @nacos.password@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
#数据中心使用
- data-id: share-config-datasource-db.yaml
refresh: true
#PMS使用
# - data-Id: share-config-harmonic-db.yaml
# refresh: true
main:
allow-bean-definition-overriding: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
jackson:
time-zone: GMT+8
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
type-aliases-package: com.njcn.harmonic.pojo
global-config:
enable-sql-runner: true
mqtt:
client-id: @artifactId@${random.value}
profiles:
active: @spring.profiles.active@

View File

@@ -0,0 +1,48 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10232
max-http-header-size: 1048576
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
server-addr: @nacos.url@
namespace: @nacos.namespace@
config:
username: @nacos.username@
password: @nacos.password@
server-addr: @nacos.url@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
#项目日志的配置
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
type-aliases-package: com.njcn.supervision.pojo

View File

@@ -0,0 +1,52 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10232
max-http-header-size: 1048576
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
type-aliases-package: com.njcn.supervision.pojo
mqtt:
client-id: @artifactId@${random.value}

View File

@@ -1,52 +1,3 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10232
max-http-header-size: 1048576
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
type-aliases-package: com.njcn.supervision.pojo
mqtt:
client-id: @artifactId@${random.value}
profiles:
active: @spring.profiles.active@

View File

@@ -0,0 +1,65 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10207
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
server-addr: @nacos.url@
namespace: @nacos.namespace@
config:
username: @nacos.username@
password: @nacos.password@
server-addr: @nacos.url@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
jackson:
time-zone: GMT+8
#项目日志的配置
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.system.pojo
runTake:
#最大重试次数
maxRetryCount: 10
#等待时间(毫秒)
delayTime: 25000
#清除日志月份
clear:
num: 3

View File

@@ -0,0 +1,70 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10207
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
jackson:
time-zone: GMT+8
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.system.pojo
runTake:
#最大重试次数
maxRetryCount: 10
#等待时间(毫秒)
delayTime: 25000
#清除日志月份
clear:
num: 3
mqtt:
client-id: @artifactId@${random.value}

View File

@@ -1,70 +1,3 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10207
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
jackson:
time-zone: GMT+8
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.system.pojo
runTake:
#最大重试次数
maxRetryCount: 10
#等待时间(毫秒)
delayTime: 25000
#清除日志月份
clear:
num: 3
mqtt:
client-id: @artifactId@${random.value}
profiles:
active: @spring.profiles.active@

View File

@@ -0,0 +1,53 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10201
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
cloud:
nacos:
discovery:
server-addr: @nacos.url@
namespace: @nacos.namespace@
config:
username: @nacos.username@
password: @nacos.password@
server-addr: @nacos.url@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
#项目日志的配置
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.user.pojo
mqtt:
client-id: @artifactId@${random.value}

View File

@@ -0,0 +1,84 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10201
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
# main:
# allow-bean-definition-overriding: true
# #nacos注册中心以及配置中心的指定
# cloud:
# servicecomb:
# service:
# name: ${spring.application.name}
# version: 0.0.1
# application: pms-application
# environment: production
# discovery:
# address: https://116.63.42.60:30100
# health-check-interval: 10
# poll-interval: 15000
# wait-time-for-shut-down-in-millis: 15000
# config:
# server-addr: https://116.63.42.60:30110
# server-type: kie
# kie:
# custom-label: ${spring.application.name}
# custom-label-value: default
# 自定义配置使用文本的key/value配置项作为yaml格式配置
# fileSource: cse.share.yaml,cse.db.yaml
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.user.pojo
mqtt:
client-id: @artifactId@${random.value}

View File

@@ -1,84 +1,3 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10201
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
# main:
# allow-bean-definition-overriding: true
# #nacos注册中心以及配置中心的指定
# cloud:
# servicecomb:
# service:
# name: ${spring.application.name}
# version: 0.0.1
# application: pms-application
# environment: production
# discovery:
# address: https://116.63.42.60:30100
# health-check-interval: 10
# poll-interval: 15000
# wait-time-for-shut-down-in-millis: 15000
# config:
# server-addr: https://116.63.42.60:30110
# server-type: kie
# kie:
# custom-label: ${spring.application.name}
# custom-label-value: default
# 自定义配置使用文本的key/value配置项作为yaml格式配置
# fileSource: cse.share.yaml,cse.db.yaml
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
username: @nacos.username@
password: @nacos.password@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
#项目日志的配置
logging:
#config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.user.pojo
mqtt:
client-id: @artifactId@${random.value}
profiles:
active: @spring.profiles.active@