mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-10-14 13:50:25 +00:00
build docker 构建镜像相关配置, all on one相关配置优化
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<groupId>org.dromara.daxpay</groupId>
|
||||
<artifactId>daxpay-single-server</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>3.0.0.beta1</version>
|
||||
<version>3.0.0.beta2</version>
|
||||
<description>daxpay服务端</description>
|
||||
|
||||
<properties>
|
||||
@@ -29,8 +29,8 @@
|
||||
<easypoi.version>4.5.0</easypoi.version>
|
||||
<minio.version>8.5.2</minio.version>
|
||||
|
||||
<bootx-platform.version>3.0.0.beta1</bootx-platform.version>
|
||||
<daxpay.version>3.0.0.beta1</daxpay.version>
|
||||
<bootx-platform.version>3.0.0.beta2</bootx-platform.version>
|
||||
<daxpay.version>3.0.0.beta2</daxpay.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -64,17 +64,16 @@
|
||||
</dependency>
|
||||
|
||||
<!-- 数据库驱动 PG -->
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.postgresql</groupId>-->
|
||||
<!-- <artifactId>postgresql</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- 数据库驱动 MySQL -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.mysql</groupId>-->
|
||||
<!-- <artifactId>mysql-connector-j</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--文件存储 (minio方式)-->
|
||||
<dependency>
|
||||
@@ -124,6 +123,8 @@
|
||||
<nonFilteredFileExtension>xls</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>docx</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>doc</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>ttf</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>woff</nonFilteredFileExtension>
|
||||
</nonFilteredFileExtensions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
@@ -3,6 +3,7 @@ package org.dromara.daxpay;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
/**
|
||||
@@ -15,9 +16,26 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
public class FrontWebConfig implements WebMvcConfigurer {
|
||||
private final FrontH5Interceptor h5Interceptor;
|
||||
private final FrontWebInterceptor webInterceptor;
|
||||
|
||||
/**
|
||||
* 内嵌服务重定向
|
||||
*/
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(h5Interceptor).addPathPatterns("/h5/**");
|
||||
registry.addInterceptor(webInterceptor).addPathPatterns("/web/**");
|
||||
}
|
||||
|
||||
/**
|
||||
* 重写资源路径配置 (内嵌服务时使用)
|
||||
*/
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
// 移动端网页映射
|
||||
registry.addResourceHandler("/h5/**").addResourceLocations("classpath:/static/h5/");
|
||||
// 电脑端网页映射
|
||||
registry.addResourceHandler("/web/**").addResourceLocations("classpath:/static/web/");
|
||||
// 上传文件访问映射
|
||||
registry.addResourceHandler("/storage/**").addResourceLocations("file:/data/files/");
|
||||
}
|
||||
}
|
||||
|
@@ -5,15 +5,15 @@ spring:
|
||||
datasource:
|
||||
master:
|
||||
# Postgresql连接
|
||||
driver-class-name: org.postgresql.Driver
|
||||
url: jdbc:postgresql://postgresql:5432/dax-pay-single?serverTimezone=Asia/Shanghai&autoReconnect=true&reWriteBatchedInserts=true
|
||||
username: bootx
|
||||
password: bootx123
|
||||
# driver-class-name: org.postgresql.Driver
|
||||
# url: jdbc:postgresql://postgresql:5432/daxpay?serverTimezone=Asia/Shanghai&autoReconnect=true&reWriteBatchedInserts=true
|
||||
# username: bootx
|
||||
# password: bootx123
|
||||
# MySQL连接
|
||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://mysql/dax-pay-single?serverTimezone=GMT%2B8&characterEncoding=utf8&allowMultiQueries=true&useSSL=false&nullCatalogMeansCurrent=true
|
||||
# username: root
|
||||
# password: root
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://mysql:3306/dax-pay-single?serverTimezone=GMT%2B8&characterEncoding=utf8&allowMultiQueries=true&useSSL=false&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: root
|
||||
hikari:
|
||||
keepalive-time: 300000
|
||||
data:
|
||||
@@ -55,7 +55,10 @@ bootx-platform:
|
||||
- org.dromara.daxpay
|
||||
starter:
|
||||
auth:
|
||||
# 是否启用超级管理员登录
|
||||
enable-admin: true
|
||||
# 用户管理列表中是否显示超级管理员
|
||||
admin-in-list: true
|
||||
ignore-urls:
|
||||
- '/actuator/**'
|
||||
- '/v3/api-docs/**'
|
||||
@@ -71,9 +74,6 @@ bootx-platform:
|
||||
- '/css/**'
|
||||
- '/error'
|
||||
- '/favicon.ico'
|
||||
file-upload:
|
||||
# 使用后端代理访问, 线上请使用 Nginx 配置或者直连方式,效率更高
|
||||
forward-server-url: http://127.0.0.1:9999
|
||||
dax-pay:
|
||||
# 推荐只使用字母和数字, 特殊符号会导致部分通道出问题
|
||||
env: DEV
|
||||
|
@@ -4,19 +4,19 @@ spring:
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
# Postgresql连接
|
||||
driver-class-name: org.postgresql.Driver
|
||||
url: jdbc:postgresql://127.0.0.1:5432/dax-pay-single-demo?serverTimezone=Asia/Shanghai&autoReconnect=true&reWriteBatchedInserts=true
|
||||
username: bootx
|
||||
password: bootx123
|
||||
# MySQL连接
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: ${MYSQL_URL}
|
||||
username: ${MYSQL_USERNAME}
|
||||
password: ${MYSQL_PASSWORD}
|
||||
hikari:
|
||||
keepalive-time: 300000
|
||||
data:
|
||||
redis:
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
database: 14
|
||||
password: bootx123
|
||||
host: ${REDIS_HOST}
|
||||
port: ${REDIS_PORT}
|
||||
database: ${REDIS_DATABASE}
|
||||
password: ${REDIS_PASSWORD}
|
||||
lettuce:
|
||||
pool:
|
||||
max-wait: 1000ms
|
||||
@@ -26,8 +26,8 @@ springdoc:
|
||||
default-flat-param-object: true
|
||||
knife4j:
|
||||
enable: true
|
||||
# 关闭swagger接口
|
||||
production: true
|
||||
# 为true 关闭swagger接口
|
||||
production: ${KNIFE4J_PRODUCTION:false}
|
||||
# 基础脚手架配置
|
||||
bootx-platform:
|
||||
common:
|
||||
@@ -50,26 +50,32 @@ bootx-platform:
|
||||
starter:
|
||||
auth:
|
||||
# 是否启用超级管理员登录
|
||||
enable-admin: false
|
||||
enable-admin: ${DAXPAY_ENABLE_ADMIN:true}
|
||||
# 用户管理列表中是否显示超级管理员
|
||||
admin-in-list: false
|
||||
admin-in-list: ${DAXPAY_ADMIN-IN-LIST:true}
|
||||
ignore-urls:
|
||||
- '/actuator/**'
|
||||
- '/swagger-resources/**'
|
||||
- '/token/**'
|
||||
- '/ws/**'
|
||||
- '/v3/api-docs/**'
|
||||
- '/doc.html'
|
||||
- '/swagger-resources/**'
|
||||
- '/webjars/**'
|
||||
- '/storage/**'
|
||||
- '/web/**'
|
||||
- '/h5/**'
|
||||
- '/css/**'
|
||||
- '/error'
|
||||
- '/favicon.ico'
|
||||
file-upload:
|
||||
# 使用后端代理访问, 线上请使用 Nginx 配置或者直连方式,效率更高
|
||||
forward-server-url: http://127.0.0.1:9999
|
||||
audit-log:
|
||||
ip2region:
|
||||
# 默认使用索引模式
|
||||
search-type: vector_index
|
||||
# 文件存储地址
|
||||
file-path: /data/ip2region/ip2region.xdb
|
||||
dax-pay:
|
||||
# 推荐只使用字母和数字, 特殊符号会导致部分通道出问题
|
||||
env: DEMO
|
||||
env: DAX
|
||||
machine-no: 70
|
||||
dromara:
|
||||
# 注意, 不要设置 domain 访问路径, 自行进行拼接访问路径, 来保证可迁移性
|
||||
@@ -82,12 +88,3 @@ dromara:
|
||||
enable-storage: true
|
||||
base-path: /file/ # 基基础存储路径 前缀和结尾都必须为 /
|
||||
storage-path: /data/files/ # 存储路径, 结尾必须为 /
|
||||
# 例如 minio地址 http://127.0.0.1:9002 桶名称 daxpay, 拼接后的地址为 http://127.0.0.1:9002/daxpay/
|
||||
minio:
|
||||
- platform: minio
|
||||
enable-storage: true
|
||||
access-key: yDAArSoyQAligC2IGf7C
|
||||
secret-key: vDgpt5R4kR2UCapMzx32Rb6qZegok21dRsU6XJ1j
|
||||
end-point: http://127.0.0.1:9002 # minio访问地址
|
||||
bucket-name: daxpay # 存储桶名称
|
||||
base-path: /file/ # 基础存储路径 前缀和结尾都必须为 /
|
@@ -4,7 +4,6 @@
|
||||
默认情况下,Spring Boot 不会 在 jar 文件之外寻找资源。
|
||||
如果你想使用外部 logback 配置文件,你必须在启动 jar 时传递它的位置:$ java -jar -Dlogging.config=./logback-spring.xml app.jar
|
||||
-->
|
||||
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
|
||||
<!--项目名称-->
|
||||
<property name="appname" value="dax-pay-server"/>
|
||||
@@ -18,9 +17,24 @@
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- log格式日志收集 -->
|
||||
<appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<File>${logdir}/${appname}.log</File>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<FileNamePattern>${logdir}/${appname}.log.%d{yyyy-MM-dd}.gz</FileNamePattern>
|
||||
<!-- 保存30天 -->
|
||||
<maxHistory>30</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<charset>UTF-8</charset>
|
||||
<pattern>%date{yyyy-MM-dd HH:mm:ssS} | %-5level[%X{traceId:-}] %thread - %logger{36}| %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 开发输出级别 -->
|
||||
<root level="INFO">
|
||||
<appender-ref ref="console"/>
|
||||
<appender-ref ref="file"/>
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
|
Reference in New Issue
Block a user