m2pool项目提交

Signed-off-by: jxy_duyi <2826961034@qq.com>
This commit is contained in:
jxy_duyi
2025-04-10 18:44:21 +08:00
parent faaeb24007
commit c4f34073c4
508 changed files with 50991 additions and 0 deletions

View File

@@ -0,0 +1,100 @@
# Tomcat
server:
port: 8201
# Spring
spring:
application:
# 应用名称
name: m2pool-gateway
profiles:
# 环境配置
active: prod
main:
allow-circular-references: true
allow-bean-definition-overriding: true
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8808
namespace: m2_prod
group: m2_prod_group
config:
# 配置中心地址
server-addr: 127.0.0.1:8808
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
namespace: m2_prod
group: m2_prod_group
sentinel:
# 取消控制台懒加载
eager: true
transport:
# 控制台地址
dashboard: 127.0.0.1:8718
# nacos配置持久化
datasource:
ds1:
nacos:
server-addr: 127.0.0.1:8808
dataId: sentinel-m2pool-gateway
groupId: m2_prod_group
data-type: json
rule-type: flow
servlet:
multipart:
max-file-size: 2MB
max-request-size: 8MB
#server:
# port: 8101
## Spring
#spring:
# application:
# # 应用名称
# name: m2pool-gateway
# profiles:
# # 环境配置
# active: test
# main:
# allow-circular-references: true
# allow-bean-definition-overriding: true
#
# cloud:
# nacos:
# discovery:
# server-addr: 127.0.0.1:8808
# namespace: m2_test
# group: m2_test_group
# config:
# # 配置中心地址
# server-addr: 127.0.0.1:8808
# # 配置文件格式
# file-extension: yml
# # 共享配置
# shared-configs:
# - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
# namespace: m2_test
# group: m2_test_group
# sentinel:
# # 取消控制台懒加载
# eager: true
# transport:
# # 控制台地址
# dashboard: 127.0.0.1:8718
# # nacos配置持久化
# datasource:
# ds1:
# nacos:
# server-addr: 127.0.0.1:8808
# dataId: sentinel-m2pool-gateway
# groupId: m2_test_group
# data-type: json
# rule-type: flow
# servlet:
# multipart:
# max-file-size: 2MB
# max-request-size: 8MB

View File

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<!-- 日志存放路径 -->
<property name="log.path" value="logs/m2pool-gateway" />
<!-- 日志输出格式 -->
<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}/info.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 单位:天 -->
<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}/error.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/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>
<!-- 系统模块日志级别控制 -->
<logger name="com.m2pool" level="info" />
<!-- Spring日志级别控制 -->
<logger name="org.springframework" level="warn" />
<root level="info">
<appender-ref ref="console" />
</root>
<!--系统操作日志-->
<root level="info">
<appender-ref ref="file_info" />
<appender-ref ref="file_error" />
</root>
</configuration>

Binary file not shown.