工作流程审核不通过、预告警单处理、终端周期检测等需求

1、提交了主pom,因为需要引入达梦数据量;
2、提交了gateway的配置文件,因为部分接口没有添加到权限中,待后续增加后再注释
This commit is contained in:
2024-09-13 20:31:32 +08:00
parent 06493c07c3
commit ba6762587f
50 changed files with 1144 additions and 110 deletions

View File

@@ -34,24 +34,24 @@ 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("njcnDnzlcn870299", "PqsadminDNZL001");
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 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);
// }
}
private void applyLogbackConfig(String logbackConfigContent) {