ref 模块结构调整

This commit is contained in:
xxm1995
2023-07-03 17:20:36 +08:00
parent fcd16c019a
commit 79956ba3a8
17 changed files with 124 additions and 80 deletions

View File

@@ -18,7 +18,7 @@ WORKDIR /
EXPOSE 9898
# 添加执行jar包
ADD bootx-start/target/bootx-start.jar bootx-start.jar
ADD dax-start/target/dax-start.jar dax-start.jar
# 执行启动命令
CMD java $JAVA_OPTS -jar bootx-start.jar
CMD java $JAVA_OPTS -jar dax-start.jar

View File

@@ -18,24 +18,6 @@
</properties>
<dependencies>
<!-- web mvc -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- undertow -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<!-- thymeleaf 模板引擎 -->
<dependency>
<groupId>org.springframework.boot</groupId>
@@ -181,32 +163,6 @@
<artifactId>IJPay-WxPay</artifactId>
<version>${IJPay.version}</version>
</dependency>
<!-- 非项目直接依赖 业务上未直接使用 -->
<!-- 2.x版本有问题,直接限定这个版本 -->
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>${xml-apis.version}</version>
</dependency>
<!-- plumeLog日志 -->
<dependency>
<groupId>com.plumelog</groupId>
<artifactId>plumelog-logback</artifactId>
<version>${plumelog.version}</version>
</dependency>
</dependencies>
<build>
<finalName>dax-pay</finalName>
<plugins>
<!-- spring-boot -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@@ -1,18 +1,9 @@
package cn.bootx.platform.daxpay;
import cn.hutool.core.util.StrUtil;
import io.minio.credentials.MinioClientConfigProvider;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Mapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;
import java.net.InetAddress;
import java.net.UnknownHostException;
/**
* DaxPay 支付开发平台
@@ -23,26 +14,6 @@ import java.net.UnknownHostException;
@Slf4j
@ConfigurationPropertiesScan
@MapperScan(annotationClass = Mapper.class)
@SpringBootApplication
public class DaxPayApplication {
public static void main(String[] args) throws UnknownHostException {
ConfigurableApplicationContext application = SpringApplication.run(DaxPayApplication.class, args);
Environment env = application.getEnvironment();
// 环境变量
String appName = env.getProperty("spring.application.name");
String host = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port");
String contextPath = env.getProperty("server.servlet.context-path", "");
String path = env.getProperty("spring.mvc.servlet.path", "");
// 应用信息栏
String appInfo = StrUtil.format("应用 '{}' 运行成功! \n\t", appName);
// swagger栏
String swagger = StrUtil.format("Swagger文档: \t\thttp://{}:{}{}{}/doc.html\n\t", host, port, contextPath, path);
log.info("\n----------------------------------------------------------\n\t" + "{}{} \n"
+ "----------------------------------------------------------", appInfo, swagger);
}
}

View File

@@ -300,7 +300,7 @@ public class VoucherPayService {
if (Objects.equals(v,voucher)){
voucherLog.setAmount(voucherPayment.getAmount())
.setType(VoucherCode.LOG_REFUND_SELF)
.setRemark(String.format("退款金额 %.2f, 退款到卡号: %s 储值卡中", voucherAmount, voucher.getCardNo()))
.setRemark(String.format("退款金额 %.2f, 退款到卡号: %s 储值卡中", voucherAmount, voucher.getCardNo()));
}
}
voucherManager.updateById(voucher);

View File

@@ -0,0 +1 @@
cn.bootx.platform.daxpay.DaxPayApplication

72
dax-start/pom.xml Normal file
View File

@@ -0,0 +1,72 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.bootx.platform</groupId>
<artifactId>bootx-dax-pay</artifactId>
<version>1.3.0</version>
</parent>
<artifactId>dax-start</artifactId>
<dependencies>
<!-- lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<!-- web mvc -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- undertow -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<!-- 支付 -->
<dependency>
<groupId>cn.bootx.platform</groupId>
<artifactId>dax-pay</artifactId>
<version>${dax.version}</version>
</dependency>
<!-- 非项目直接依赖 业务上未直接使用 -->
<!-- 2.x版本有问题,直接限定这个版本 -->
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>${xml-apis.version}</version>
</dependency>
<!-- plumeLog日志 -->
<dependency>
<groupId>com.plumelog</groupId>
<artifactId>plumelog-logback</artifactId>
<version>${plumelog.version}</version>
</dependency>
</dependencies>
<build>
<finalName>dax-pay</finalName>
<plugins>
<!-- spring-boot -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,42 @@
package cn.bootx.platform.daxpay;
import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;
import java.net.InetAddress;
import java.net.UnknownHostException;
/**
* DaxPay 支付开发平台
*
* @author xxm
* @since 2023/4/20
*/
@Slf4j
@SpringBootApplication
public class DaxPayStart {
public static void main(String[] args) throws UnknownHostException {
ConfigurableApplicationContext application = SpringApplication.run(DaxPayStart.class, args);
Environment env = application.getEnvironment();
// 环境变量
String appName = env.getProperty("spring.application.name");
String host = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port");
String contextPath = env.getProperty("server.servlet.context-path", "");
String path = env.getProperty("spring.mvc.servlet.path", "");
// 应用信息栏
String appInfo = StrUtil.format("应用 '{}' 运行成功! \n\t", appName);
// swagger栏
String swagger = StrUtil.format("Swagger文档: \t\thttp://{}:{}{}{}/doc.html\n\t", host, port, contextPath, path);
log.info("\n----------------------------------------------------------\n\t" + "{}{} \n"
+ "----------------------------------------------------------", appInfo, swagger);
}
}

View File

@@ -1,12 +1,12 @@
version: '3'
services:
platform:
image: bootx-platform:latest
image: dax-start:latest
restart: always
ports:
- "8080:8080"
volumes:
# 宿主机目录:容器目录 日志映射
- /data/logs/bootx-platform:/logs
# 外部化配置文件
- ./application.yml:/application.yml
- /data/logs/dax-start:/logs
# 读取外部化配置文件
- ./:/

View File

@@ -19,6 +19,7 @@
<modules>
<module>dax-pay</module>
<module>dax-start</module>
</modules>
<properties>
@@ -28,6 +29,7 @@
<!-- 二方库版本 -->
<bootx-platform.version>1.3.1</bootx-platform.version>
<dax.version>1.3.0</dax.version>
<!-- 三方库 -->
<hutool.version>5.8.15</hutool.version>
<oshi.version>6.4.0</oshi.version>