最新版本升级
This commit is contained in:
149
openhis-server-new/openhis-einvoiceapp/pom.xml
Normal file
149
openhis-server-new/openhis-einvoiceapp/pom.xml
Normal file
@@ -0,0 +1,149 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>openhis-server</artifactId>
|
||||
<groupId>com.openhis</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>openhis-einvoiceapp</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 领域-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.openhis</groupId>-->
|
||||
<!-- <artifactId>openhis-domain</artifactId>-->
|
||||
<!-- <version>0.0.1-SNAPSHOT</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
<version>2.5.15</version> <!-- 确保版本与你的项目一致 -->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>2.0.43</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
<!-- 共通-->
|
||||
<dependency>
|
||||
<groupId>com.openhis</groupId>
|
||||
<artifactId>openhis-common</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- liteflow-->
|
||||
<dependency>
|
||||
<groupId>com.yomahub</groupId>
|
||||
<artifactId>liteflow-spring-boot-starter</artifactId>
|
||||
<version>2.12.4.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.3.8</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15on</artifactId>
|
||||
<version>1.69</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>2.0.43</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
<version>3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itextpdf</groupId>
|
||||
<artifactId>kernel</artifactId>
|
||||
<version>7.1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpmime</artifactId>
|
||||
<version>4.5</version>
|
||||
</dependency>
|
||||
|
||||
<!-- pdf依赖-->
|
||||
<dependency>
|
||||
<groupId>com.itextpdf</groupId>
|
||||
<artifactId>itextpdf</artifactId>
|
||||
<version>5.5.12</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itextpdf</groupId>
|
||||
<artifactId>itext-asian</artifactId>
|
||||
<version>5.2.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.5.15</version>
|
||||
<configuration>
|
||||
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>9</source>
|
||||
<target>9</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.openhis;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.core.env.Environment;
|
||||
|
||||
/**
|
||||
* 启动程序
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}, scanBasePackages = {"com.core", "com.openhis"})
|
||||
public class OpenHisInvoiceApplication {
|
||||
public static void main(String[] args) throws UnknownHostException {
|
||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
ConfigurableApplicationContext application = SpringApplication.run(OpenHisInvoiceApplication.class, args);
|
||||
Environment env = application.getEnvironment();
|
||||
String ip = InetAddress.getLocalHost().getHostAddress();
|
||||
String port = env.getProperty("server.port");
|
||||
String path = env.getProperty("server.servlet.context-path");
|
||||
System.out.println("电子处方程序启动");
|
||||
|
||||
System.out.println("\n----------------------------------------------------------\n\t"
|
||||
+ "Application OpenHis-YB is running! Access URLs:\n\t" + "Local: \t\thttp://localhost:" + port + path
|
||||
+ "/\n\t" + "External: \thttp://" + ip + ":" + port + path + "/\n"
|
||||
+ "----------------------------------------------------------");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.controller;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.core.common.utils.StringUtils;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.openhis.vo.EleInvioceBillDto;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.core.common.annotation.Anonymous;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Base64;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* TODO:医保控制层
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-03-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/eleInvoice")
|
||||
public class YbController {
|
||||
|
||||
Logger logger = LoggerFactory.getLogger(YbController.class);
|
||||
// logger.debug("这是专用日志测试");
|
||||
|
||||
@PostMapping(value = "/forward")
|
||||
@Anonymous
|
||||
public JSONObject signIn(@RequestBody EleInvioceBillDto eleInvioceBillDto) {
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
// 获取当前租户的option信息
|
||||
//JSONObject optionJson = SecurityUtils.getLoginUser().getOptionJson();
|
||||
|
||||
String baseUrl = eleInvioceBillDto.getBaseUrl();
|
||||
// 拼接成完整 URL(作为路径)
|
||||
String cleanUrl = baseUrl + "/" + eleInvioceBillDto.getEndpoint(); // 确保用 "/" 分隔
|
||||
String url = cleanUrl.trim().replaceAll("^\"|\"$", "") // 去除首尾引号
|
||||
.replaceAll("\\s+", "")// 去除首尾引号
|
||||
.replaceAll("\"", ""); // 去除中间引号
|
||||
|
||||
//String appID = optionJson.getString(CommonConstants.Option.APP_ID);
|
||||
String appID = eleInvioceBillDto.getAppID();
|
||||
//String appKey = optionJson.getString(CommonConstants.Option.KEY);
|
||||
String appKey = eleInvioceBillDto.getAppKey();
|
||||
String data = eleInvioceBillDto.getJsonObject().toJSONString();
|
||||
String version = "1.0";
|
||||
// 请求随机标识 noise
|
||||
String noise = UUID.randomUUID().toString();
|
||||
|
||||
data = Base64.getEncoder().encodeToString(data.getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
StringBuilder str = new StringBuilder();
|
||||
str.append("appid=").append(appID);
|
||||
str.append("&data=").append(data);
|
||||
str.append("&noise=").append(noise);
|
||||
str.append("&key=").append(appKey);
|
||||
str.append("&version=").append(version);
|
||||
String sign = DigestUtils.md5Hex(str.toString().getBytes(Charset.forName("UTF-8"))).toUpperCase();
|
||||
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("appid", appID);
|
||||
map.put("data", data);
|
||||
map.put("noise", noise);
|
||||
map.put("sign", sign);
|
||||
map.put("version", version);
|
||||
|
||||
try {
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
CloseableHttpClient client = HttpClients.createDefault();
|
||||
String respContent = null;
|
||||
// 请求参数转JOSN字符串
|
||||
StringEntity entity = new StringEntity(new ObjectMapper().writeValueAsString(map), "utf-8");
|
||||
entity.setContentEncoding("UTF-8");
|
||||
entity.setContentType("application/json");
|
||||
httpPost.setEntity(entity);
|
||||
HttpResponse resp = client.execute(httpPost);
|
||||
|
||||
if (resp.getStatusLine().getStatusCode() == 200) {
|
||||
String rev = EntityUtils.toString(resp.getEntity());
|
||||
// System.out.println("返回串--》"+rev);
|
||||
Map resultData = new ObjectMapper().readValue(rev, Map.class);
|
||||
String rdata = resultData.get("data").toString();
|
||||
String rnoise = resultData.get("noise").toString();
|
||||
// 1、拼接返回验签参数
|
||||
StringBuilder str1 = new StringBuilder();
|
||||
str1.append("appid=").append(appID);
|
||||
str1.append("&data=").append(rdata);
|
||||
str1.append("&noise=").append(rnoise);
|
||||
str1.append("&key=").append(appKey);
|
||||
str1.append("&version=").append(version);
|
||||
// 3.MD5加密 生成sign
|
||||
String rmd5 = DigestUtils.md5Hex(str1.toString().getBytes(Charset.forName("UTF-8"))).toUpperCase();
|
||||
String rsign = resultData.get("sign").toString();
|
||||
System.out.println("验签-》" + (StringUtils.equals(rsign, rmd5)));
|
||||
String busData =
|
||||
new String(Base64.getDecoder().decode(resultData.get("data").toString()), StandardCharsets.UTF_8);
|
||||
System.out.println("返回业务数据--》" + busData);
|
||||
Map busDataMap = new ObjectMapper().readValue(busData, Map.class);
|
||||
System.out
|
||||
.println("业务信息解密--》" + new String(Base64.getDecoder().decode(busDataMap.get("message").toString()),
|
||||
StandardCharsets.UTF_8));
|
||||
|
||||
JSONObject resobj = JSONObject.parseObject(busData);
|
||||
result.put("success", true);
|
||||
result.put("result", resobj);
|
||||
} else {
|
||||
result.put("msg", "web响应失败!");
|
||||
result.put("success", false);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
result.put("msg", e.getMessage());
|
||||
result.put("success", false);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.openhis.vo;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class EleInvioceBillDto {
|
||||
|
||||
JSONObject jsonObject;
|
||||
|
||||
String endpoint;
|
||||
|
||||
String baseUrl;
|
||||
|
||||
String appID;
|
||||
|
||||
String appKey;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: org.postgresql.Driver
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
# url: jdbc:postgresql://localhost:5432/openhis?currentSchema=public&characterEncoding=UTF-8&client_encoding=UTF-8
|
||||
url: jdbc:postgresql://192.168.10.242:5432/openhis?currentSchema=public&characterEncoding=UTF-8&client_encoding=UTF-8
|
||||
# url: jdbc:postgresql://localhost:8020/openhis?currentSchema=public&characterEncoding=UTF-8&client_encoding=UTF-8
|
||||
username: postgres
|
||||
password: root
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
enabled: false
|
||||
url:
|
||||
username:
|
||||
password:
|
||||
# 初始连接数
|
||||
initialSize: 5
|
||||
# 最小连接池数量
|
||||
minIdle: 10
|
||||
# 最大连接池数量
|
||||
maxActive: 20
|
||||
# 配置获取连接等待超时的时间
|
||||
maxWait: 60000
|
||||
# 配置连接超时时间
|
||||
connectTimeout: 30000
|
||||
# 配置网络超时时间
|
||||
socketTimeout: 60000
|
||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||
maxEvictableIdleTimeMillis: 900000
|
||||
# 配置检测连接是否有效
|
||||
validationQuery: SELECT 1 # FROM DUAL
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
webStatFilter:
|
||||
enabled: true
|
||||
statViewServlet:
|
||||
enabled: true
|
||||
# 设置白名单,不填则允许所有访问
|
||||
allow:
|
||||
url-pattern: /druid/*
|
||||
# 控制台管理用户名和密码
|
||||
login-username: openhis
|
||||
login-password: 123456
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
# 慢SQL记录
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
@@ -0,0 +1,61 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: org.postgresql.Driver
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:postgresql://localhost:5432/openhis?currentSchema=public&characterEncoding=UTF-8&client_encoding=UTF-8
|
||||
username: postgres
|
||||
password: root
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
enabled: false
|
||||
url:
|
||||
username:
|
||||
password:
|
||||
# 初始连接数
|
||||
initialSize: 5
|
||||
# 最小连接池数量
|
||||
minIdle: 10
|
||||
# 最大连接池数量
|
||||
maxActive: 20
|
||||
# 配置获取连接等待超时的时间
|
||||
maxWait: 60000
|
||||
# 配置连接超时时间
|
||||
connectTimeout: 30000
|
||||
# 配置网络超时时间
|
||||
socketTimeout: 60000
|
||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||
maxEvictableIdleTimeMillis: 900000
|
||||
# 配置检测连接是否有效
|
||||
validationQuery: SELECT 1 # FROM DUAL
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
webStatFilter:
|
||||
enabled: true
|
||||
statViewServlet:
|
||||
enabled: true
|
||||
# 设置白名单,不填则允许所有访问
|
||||
allow:
|
||||
url-pattern: /druid/*
|
||||
# 控制台管理用户名和密码
|
||||
login-username: openhis
|
||||
login-password: 123456
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
# 慢SQL记录
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
@@ -0,0 +1,159 @@
|
||||
# 项目相关配置
|
||||
core:
|
||||
# 名称
|
||||
name: OpenHis_eInvoice
|
||||
# 版本
|
||||
version: 0.0.1
|
||||
# 版权年份
|
||||
copyrightYear: 2025
|
||||
# 文件路径
|
||||
profile: D:/home/uploadPath
|
||||
# 获取ip地址开关
|
||||
addressEnabled: false
|
||||
# 验证码类型 math 数字计算 char 字符验证
|
||||
captchaType: math
|
||||
|
||||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为18080
|
||||
port: 18078
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /openhis/eInvoice
|
||||
tomcat:
|
||||
# tomcat的URI编码
|
||||
uri-encoding: UTF-8
|
||||
# 连接数满后的排队数,默认为100
|
||||
accept-count: 1000
|
||||
threads:
|
||||
# tomcat最大线程数,默认为200
|
||||
max: 800
|
||||
# Tomcat启动初始化的线程数,默认值10
|
||||
min-spare: 100
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
level:
|
||||
com.openhis: debug
|
||||
org.springframework: warn
|
||||
|
||||
# 用户配置
|
||||
user:
|
||||
password:
|
||||
# 密码最大错误次数
|
||||
maxRetryCount: 5
|
||||
# 密码锁定时间(默认10分钟)
|
||||
lockTime: 10
|
||||
|
||||
# Spring配置
|
||||
spring:
|
||||
main:
|
||||
allow-circular-references: true
|
||||
# 资源信息
|
||||
messages:
|
||||
# 国际化资源文件路径
|
||||
basename: i18n/messages
|
||||
profiles:
|
||||
active: druid #生产 prod #本地 druid
|
||||
# 文件上传
|
||||
servlet:
|
||||
multipart:
|
||||
# 单个文件大小
|
||||
max-file-size: 10MB
|
||||
# 设置总上传的文件大小
|
||||
max-request-size: 20MB
|
||||
# 服务模块
|
||||
devtools:
|
||||
restart:
|
||||
# 热部署开关
|
||||
enabled: true
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
# host: 127.0.0.1
|
||||
host: 192.168.10.242
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 1
|
||||
# 密码
|
||||
password: redis
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 0
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池的最大数据库连接数
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
# 文言
|
||||
messages:
|
||||
basename: i18n/general_message/messages
|
||||
encoding: utf-8
|
||||
|
||||
# token配置
|
||||
token:
|
||||
# 令牌自定义标识
|
||||
header: Authorization
|
||||
# 令牌密钥
|
||||
secret: abcdefghijklmnopqrstuvwxyz
|
||||
# 令牌有效期(默认30分钟)
|
||||
expireTime: 30
|
||||
|
||||
# MyBatis配置
|
||||
mybatis-plus:
|
||||
# 搜索指定包别名
|
||||
typeAliasesPackage: com.core.**.domain,com.openhis.**.domain
|
||||
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
# 加载全局的配置文件
|
||||
configLocation: classpath:mybatis/mybatis-config.xml
|
||||
|
||||
# PageHelper分页插件
|
||||
pagehelper:
|
||||
#helperDialect: mysql
|
||||
supportMethodsArguments: true
|
||||
params: count=countSql
|
||||
# 分页插件会自动检测当前的数据库链接,自动选择合适的分页方式
|
||||
auto-dialect: true
|
||||
# 默认值为 false。设置为 true 时,允许在运行时根据多数据源自动识别对应方言的分页
|
||||
auto-runtime-dialect: true
|
||||
|
||||
# Swagger配置
|
||||
swagger:
|
||||
# 是否开启swagger
|
||||
enabled: true
|
||||
# 请求前缀
|
||||
pathMapping: /dev-api
|
||||
|
||||
# 防止XSS攻击
|
||||
xss:
|
||||
# 过滤开关
|
||||
enabled: true
|
||||
# 排除链接(多个用逗号分隔)
|
||||
excludes: /system/notice
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
||||
# flowable相关表
|
||||
flowable:
|
||||
# true 会对数据库中所有表进行更新操作。如果表不存在,则自动创建(建议开发时使用)
|
||||
database-schema-update: false
|
||||
# 关闭定时任务JOB
|
||||
async-executor-activate: false
|
||||
|
||||
## liteflow配置
|
||||
#liteflow:
|
||||
# #规则文件路径
|
||||
# rule-source: config/flow.el.xml
|
||||
# #liteflow是否开启,默认为true
|
||||
# enable: true
|
||||
# #liteflow的banner打印是否开启,默认为true
|
||||
# print-banner: false
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
:::::::: ::::::::: :::::::::: :::: ::: ::: ::: ::::::::::: ::::::::
|
||||
:+: :+: :+: :+: :+: :+:+: :+: :+: :+: :+: :+: :+:
|
||||
+:+ +:+ +:+ +:+ +:+ :+:+:+ +:+ +:+ +:+ +:+ +:+
|
||||
+#+ +:+ +#++:++#+ +#++:++# +#+ +:+ +#+ +#++:++#++ +#+ +#++:++#++
|
||||
+#+ +#+ +#+ +#+ +#+ +#+#+# +#+ +#+ +#+ +#+
|
||||
#+# #+# #+# #+# #+# #+#+# #+# #+# #+# #+# #+#
|
||||
######## ### ########## ### #### ### ### ########### ########
|
||||
|
||||
Application Version: ${core.version}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow>
|
||||
<chain name="chain1">
|
||||
THEN(a, b, c);
|
||||
</chain>
|
||||
</flow>
|
||||
@@ -0,0 +1,21 @@
|
||||
# ????????
|
||||
dev.address=http://88.9.0.126:8080
|
||||
dev.time=600
|
||||
dev.isEncrypt=false
|
||||
|
||||
# ????????
|
||||
prod.address=http://ddjk.jlhs.gov.cn:20215
|
||||
prod.time=600
|
||||
prod.isEncrypt=true
|
||||
|
||||
|
||||
dev.cliPubKey=PubKey
|
||||
dev.cliPrvKey=PrvKey
|
||||
dev.clientId=Id
|
||||
dev.filePath="C:/Users/user/Desktop/"
|
||||
|
||||
prod.cliPubKey=PubKey2
|
||||
prod.cliPrvKey=PrvKey2
|
||||
prod.clientId=Id2
|
||||
prod.filePath="C:/Users/user/Desktop/"
|
||||
prod.eleAddress=http://10.49.24.194:8080/epc/api/
|
||||
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="/home/openhis/logs"/>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 用户访问日志输出 -->
|
||||
<appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-user.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 按天回滚 daily -->
|
||||
<fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
<!-- 新增专用日志Appender -->
|
||||
<appender name="EINVOICE_LOGS" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/e-invoice-service.log</file> <!-- 日志文件名 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 每天一个文件,保留60天 -->
|
||||
<fileNamePattern>${log.path}/e-invoice-service.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern> <!-- 使用统一日志格式 -->
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 在原有logger配置下方添加 -->
|
||||
<logger name="com.openhis.controller.YbController" level="info" additivity="false">
|
||||
<appender-ref ref="EINVOICE_LOGS" />
|
||||
</logger>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.core" level="info"/>
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn"/>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info"/>
|
||||
<appender-ref ref="file_error"/>
|
||||
</root>
|
||||
|
||||
<!--系统用户操作日志-->
|
||||
<logger name="sys-user" level="info">
|
||||
<appender-ref ref="sys-user"/>
|
||||
</logger>
|
||||
|
||||
<logger name="YB_LOGS" level="info">
|
||||
<appender-ref ref="EINVOICE_LOGS"/>
|
||||
</logger>
|
||||
</configuration>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE configuration
|
||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||
<configuration>
|
||||
<!-- 全局参数 -->
|
||||
<settings>
|
||||
<!-- 使全局的映射器启用或禁用缓存 -->
|
||||
<setting name="cacheEnabled" value="true"/>
|
||||
<!-- 允许JDBC 支持自动生成主键 -->
|
||||
<setting name="useGeneratedKeys" value="true"/>
|
||||
<!-- 配置默认的执行器.SIMPLE就是普通执行器;REUSE执行器会重用预处理语句(prepared statements);BATCH执行器将重用语句并执行批量更新 -->
|
||||
<setting name="defaultExecutorType" value="SIMPLE"/>
|
||||
<!-- 指定 MyBatis 所用日志的具体实现 -->
|
||||
<setting name="logImpl" value="SLF4J"/>
|
||||
<!-- <setting name="logImpl" value="org.apache.ibatis.logging.stdout.StdOutImpl"/>-->
|
||||
<!-- 使用驼峰命名法转换字段 -->
|
||||
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
|
||||
</settings>
|
||||
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user