mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-09-09 21:59:22 +00:00
add 新增 集成 easyretry 调度中心
This commit is contained in:
18
ruoyi-visual/ruoyi-easyretry-server/Dockerfile
Normal file
18
ruoyi-visual/ruoyi-easyretry-server/Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
#FROM findepi/graalvm:java17-native
|
||||
FROM openjdk:17.0.2-oraclelinux8
|
||||
|
||||
MAINTAINER Lion Li
|
||||
|
||||
RUN mkdir -p /ruoyi/easyretry/logs
|
||||
|
||||
WORKDIR /ruoyi/easyretry
|
||||
|
||||
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS="-Xms512m -Xmx1024m"
|
||||
|
||||
EXPOSE 8800
|
||||
EXPOSE 1788
|
||||
|
||||
ADD ./target/ruoyi-easyretry-server.jar ./app.jar
|
||||
|
||||
ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -jar app.jar \
|
||||
-XX:+HeapDumpOnOutOfMemoryError -Xlog:gc*,:time,tags,level -XX:+UseZGC ${JAVA_OPTS}
|
51
ruoyi-visual/ruoyi-easyretry-server/pom.xml
Normal file
51
ruoyi-visual/ruoyi-easyretry-server/pom.xml
Normal file
@@ -0,0 +1,51 @@
|
||||
<?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>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-visual</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>ruoyi-easyretry-server</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry-server-starter</artifactId>
|
||||
<version>${easyretry.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-nacos</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
||||
<version>${spring-boot-admin.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@@ -0,0 +1,18 @@
|
||||
package org.dromara.easyretry;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* EasyRetry Server 启动程序
|
||||
*
|
||||
* @author dhb52
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class EasyRetryServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(com.aizuda.easy.retry.server.EasyRetryServerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,58 @@
|
||||
server:
|
||||
port: 8800
|
||||
servlet:
|
||||
context-path: /easy-retry
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: ruoyi-easyretry-server
|
||||
profiles:
|
||||
active: @profiles.active@
|
||||
web:
|
||||
resources:
|
||||
static-locations: classpath:admin/
|
||||
|
||||
mybatis-plus:
|
||||
typeAliasesPackage: com.aizuda.easy.retry.template.datasource.persistence.po
|
||||
global-config:
|
||||
db-config:
|
||||
where-strategy: NOT_EMPTY
|
||||
capital-mode: false
|
||||
logic-delete-value: 1
|
||||
logic-not-delete-value: 0
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
cache-enabled: true
|
||||
|
||||
logging:
|
||||
config: classpath:logback-plus.xml
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
endpoint:
|
||||
health:
|
||||
show-details: ALWAYS
|
||||
logfile:
|
||||
external-file: ./logs/${spring.application.name}/console.log
|
||||
|
||||
--- # nacos 配置
|
||||
spring:
|
||||
cloud:
|
||||
nacos:
|
||||
# nacos 服务地址
|
||||
server-addr: @nacos.server@
|
||||
discovery:
|
||||
# 注册组
|
||||
group: @nacos.discovery.group@
|
||||
namespace: ${spring.profiles.active}
|
||||
config:
|
||||
# 配置组
|
||||
group: @nacos.config.group@
|
||||
namespace: ${spring.profiles.active}
|
||||
config:
|
||||
import:
|
||||
- optional:nacos:datasource.yml
|
||||
- optional:nacos:${spring.application.name}.yml
|
@@ -0,0 +1,10 @@
|
||||
Application Version: ${revision}
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
_
|
||||
| |
|
||||
___ __ _ ___ _ _ ______ _ __ ___| |_ _ __ _ _ ______ ___ ___ _ ____ _____ _ __
|
||||
/ _ \/ _` / __| | | |______| '__/ _ \ __| '__| | | |______/ __|/ _ \ '__\ \ / / _ \ '__|
|
||||
| __/ (_| \__ \ |_| | | | | __/ |_| | | |_| | \__ \ __/ | \ V / __/ |
|
||||
\___|\__,_|___/\__, | |_| \___|\__|_| \__, | |___/\___|_| \_/ \___|_|
|
||||
__/ | __/ |
|
||||
|___/ |___/
|
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/${project.artifactId}"/>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="console.log.pattern"
|
||||
value="%red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/>
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${console.log.pattern}</pattern>
|
||||
<charset>utf-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<include resource="logback-common.xml" />
|
||||
|
||||
<include resource="logback-logstash.xml" />
|
||||
|
||||
<!-- 开启 skywalking 日志收集 -->
|
||||
<include resource="logback-skylog.xml" />
|
||||
|
||||
<!-- EasyRetry appender -->
|
||||
<appender name="easy_log_server_appender" class="com.aizuda.easy.retry.server.job.task.support.appender.EasyRetryServerLogbackAppender">
|
||||
</appender>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="console"/>
|
||||
<appender-ref ref="easy_log_server_appender" />
|
||||
</root>
|
||||
|
||||
</configuration>
|
Reference in New Issue
Block a user