parent
6042a5b70f
commit
994397b94d
@ -1,67 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 使用说明,用来提示输入参数
|
||||
usage() {
|
||||
echo "Usage: sh 执行脚本.sh [port|base|modules|stop|rm]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# 开启所需端口
|
||||
port(){
|
||||
firewall-cmd --add-port=80/tcp --permanent
|
||||
firewall-cmd --add-port=8080/tcp --permanent
|
||||
firewall-cmd --add-port=8848/tcp --permanent
|
||||
firewall-cmd --add-port=9848/tcp --permanent
|
||||
firewall-cmd --add-port=9849/tcp --permanent
|
||||
firewall-cmd --add-port=6379/tcp --permanent
|
||||
firewall-cmd --add-port=3306/tcp --permanent
|
||||
firewall-cmd --add-port=9100/tcp --permanent
|
||||
firewall-cmd --add-port=9200/tcp --permanent
|
||||
firewall-cmd --add-port=9201/tcp --permanent
|
||||
firewall-cmd --add-port=9202/tcp --permanent
|
||||
firewall-cmd --add-port=9203/tcp --permanent
|
||||
firewall-cmd --add-port=9300/tcp --permanent
|
||||
service firewalld restart
|
||||
}
|
||||
|
||||
# 启动基础环境(必须)
|
||||
base(){
|
||||
docker-compose up -d ruoyi-mysql ruoyi-redis ruoyi-nacos
|
||||
}
|
||||
|
||||
# 启动程序模块(必须)
|
||||
modules(){
|
||||
docker-compose up -d ruoyi-nginx ruoyi-gateway ruoyi-auth ruoyi-modules-system
|
||||
}
|
||||
|
||||
# 关闭所有环境/模块
|
||||
stop(){
|
||||
docker-compose stop
|
||||
}
|
||||
|
||||
# 删除所有环境/模块
|
||||
rm(){
|
||||
docker-compose rm
|
||||
}
|
||||
|
||||
# 根据输入参数,选择执行对应方法,不输入则执行使用说明
|
||||
case "$1" in
|
||||
"port")
|
||||
port
|
||||
;;
|
||||
"base")
|
||||
base
|
||||
;;
|
||||
"modules")
|
||||
modules
|
||||
;;
|
||||
"stop")
|
||||
stop
|
||||
;;
|
||||
"rm")
|
||||
rm
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
@ -1,140 +0,0 @@
|
||||
version : '3.8'
|
||||
services:
|
||||
ruoyi-nacos:
|
||||
container_name: ruoyi-nacos
|
||||
image: nacos/nacos-server
|
||||
build:
|
||||
context: ./nacos
|
||||
environment:
|
||||
- MODE=standalone
|
||||
volumes:
|
||||
- ./nacos/logs/:/home/nacos/logs
|
||||
- ./nacos/conf/application.properties:/home/nacos/conf/application.properties
|
||||
ports:
|
||||
- "8848:8848"
|
||||
- "9848:9848"
|
||||
- "9849:9849"
|
||||
depends_on:
|
||||
- ruoyi-mysql
|
||||
ruoyi-mysql:
|
||||
container_name: ruoyi-mysql
|
||||
image: mysql:5.7
|
||||
build:
|
||||
context: ./mysql
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- ./mysql/conf:/etc/mysql/conf.d
|
||||
- ./mysql/logs:/logs
|
||||
- ./mysql/data:/var/lib/mysql
|
||||
command: [
|
||||
'mysqld',
|
||||
'--innodb-buffer-pool-size=80M',
|
||||
'--character-set-server=utf8mb4',
|
||||
'--collation-server=utf8mb4_unicode_ci',
|
||||
'--default-time-zone=+8:00',
|
||||
'--lower-case-table-names=1'
|
||||
]
|
||||
environment:
|
||||
MYSQL_DATABASE: 'ry-cloud'
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
ruoyi-redis:
|
||||
container_name: ruoyi-redis
|
||||
image: redis
|
||||
build:
|
||||
context: ./redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- ./redis/conf/redis.conf:/home/ruoyi/redis/redis.conf
|
||||
- ./redis/data:/data
|
||||
command: redis-server /home/ruoyi/redis/redis.conf
|
||||
ruoyi-nginx:
|
||||
container_name: ruoyi-nginx
|
||||
image: nginx
|
||||
build:
|
||||
context: ./nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./nginx/html/dist:/home/ruoyi/projects/ruoyi-ui
|
||||
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./nginx/logs:/var/log/nginx
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||
depends_on:
|
||||
- ruoyi-gateway
|
||||
links:
|
||||
- ruoyi-gateway
|
||||
ruoyi-gateway:
|
||||
container_name: ruoyi-gateway
|
||||
build:
|
||||
context: ./ruoyi/gateway
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
- ruoyi-redis
|
||||
links:
|
||||
- ruoyi-redis
|
||||
ruoyi-auth:
|
||||
container_name: ruoyi-auth
|
||||
build:
|
||||
context: ./ruoyi/auth
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9200:9200"
|
||||
depends_on:
|
||||
- ruoyi-redis
|
||||
links:
|
||||
- ruoyi-redis
|
||||
ruoyi-modules-system:
|
||||
container_name: ruoyi-modules-system
|
||||
build:
|
||||
context: ./ruoyi/modules/system
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9201:9201"
|
||||
depends_on:
|
||||
- ruoyi-redis
|
||||
- ruoyi-mysql
|
||||
links:
|
||||
- ruoyi-redis
|
||||
- ruoyi-mysql
|
||||
ruoyi-modules-gen:
|
||||
container_name: ruoyi-modules-gen
|
||||
build:
|
||||
context: ./ruoyi/modules/gen
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9202:9202"
|
||||
depends_on:
|
||||
- ruoyi-mysql
|
||||
links:
|
||||
- ruoyi-mysql
|
||||
ruoyi-modules-job:
|
||||
container_name: ruoyi-modules-job
|
||||
build:
|
||||
context: ./ruoyi/modules/job
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9203:9203"
|
||||
depends_on:
|
||||
- ruoyi-mysql
|
||||
links:
|
||||
- ruoyi-mysql
|
||||
ruoyi-modules-file:
|
||||
container_name: ruoyi-modules-file
|
||||
build:
|
||||
context: ./ruoyi/modules/file
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9300:9300"
|
||||
volumes:
|
||||
- ./ruoyi/uploadPath:/home/ruoyi/uploadPath
|
||||
ruoyi-visual-monitor:
|
||||
container_name: ruoyi-visual-monitor
|
||||
build:
|
||||
context: ./ruoyi/visual/monitor
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9100:9100"
|
@ -1,7 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM mysql:5.7
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 执行sql脚本
|
||||
ADD ./db/*.sql /docker-entrypoint-initdb.d/
|
@ -1,32 +0,0 @@
|
||||
spring.datasource.platform=mysql
|
||||
db.num=1
|
||||
db.url.0=jdbc:mysql://ruoyi-mysql:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
||||
db.user=root
|
||||
db.password=password
|
||||
|
||||
nacos.naming.empty-service.auto-clean=true
|
||||
nacos.naming.empty-service.clean.initial-delay-ms=50000
|
||||
nacos.naming.empty-service.clean.period-time-ms=30000
|
||||
|
||||
management.endpoints.web.exposure.include=*
|
||||
|
||||
management.metrics.export.elastic.enabled=false
|
||||
management.metrics.export.influx.enabled=false
|
||||
|
||||
server.tomcat.accesslog.enabled=true
|
||||
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i
|
||||
|
||||
server.tomcat.basedir=/home/ruoyi/nacos/tomcat/logs
|
||||
|
||||
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
||||
|
||||
nacos.core.auth.system.type=nacos
|
||||
nacos.core.auth.enabled=false
|
||||
nacos.core.auth.default.token.expire.seconds=18000
|
||||
nacos.core.auth.default.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
|
||||
nacos.core.auth.caching.enabled=true
|
||||
nacos.core.auth.enable.userAgentAuthWhite=false
|
||||
nacos.core.auth.server.identity.key=serverIdentity
|
||||
nacos.core.auth.server.identity.value=security
|
||||
|
||||
nacos.istio.mcp.server.enabled=false
|
@ -1,7 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM nacos/nacos-server
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/application.properties /home/nacos/conf/application.properties
|
@ -1,41 +0,0 @@
|
||||
worker_processes 1;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /home/ruoyi/projects/ruoyi-ui;
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
location /prod-api/{
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://ruoyi-gateway:8080/;
|
||||
}
|
||||
|
||||
# 避免actuator暴露
|
||||
if ($request_uri ~ "/actuator") {
|
||||
return 403;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM nginx
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi/projects/ruoyi-ui
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi/projects/ruoyi-ui
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi/projects/ruoyi-ui
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
|
||||
# 复制html文件到路径
|
||||
COPY ./html/dist /home/ruoyi/projects/ruoyi-ui
|
@ -1 +0,0 @@
|
||||
# requirepass 123456
|
@ -1,13 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM redis
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi/redis
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi/redis
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi/redis
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/redis.conf /home/ruoyi/redis/redis.conf
|
@ -1,15 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/ruoyi-auth.jar /home/ruoyi/ruoyi-auth.jar
|
||||
# 启动认证服务
|
||||
ENTRYPOINT ["java","-jar","ruoyi-auth.jar"]
|
@ -1,15 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/ruoyi-gateway.jar /home/ruoyi/ruoyi-gateway.jar
|
||||
# 启动网关服务
|
||||
ENTRYPOINT ["java","-jar","ruoyi-gateway.jar"]
|
@ -1,15 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/ruoyi-modules-file.jar /home/ruoyi/ruoyi-modules-file.jar
|
||||
# 启动文件服务
|
||||
ENTRYPOINT ["java","-jar","ruoyi-modules-file.jar"]
|
@ -1,15 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/ruoyi-modules-gen.jar /home/ruoyi/ruoyi-modules-gen.jar
|
||||
# 启动代码生成服务
|
||||
ENTRYPOINT ["java","-jar","ruoyi-modules-gen.jar"]
|
@ -1,15 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/ruoyi-modules-job.jar /home/ruoyi/ruoyi-modules-job.jar
|
||||
# 启动定时任务服务
|
||||
ENTRYPOINT ["java","-jar","ruoyi-modules-job.jar"]
|
@ -1,15 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/ruoyi-modules-system.jar /home/ruoyi/ruoyi-modules-system.jar
|
||||
# 启动系统服务
|
||||
ENTRYPOINT ["java","-jar","ruoyi-modules-system.jar"]
|
@ -1,15 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/ruoyi-visual-monitor.jar /home/ruoyi/ruoyi-visual-monitor.jar
|
||||
# 启动系统服务
|
||||
ENTRYPOINT ["java","-jar","ruoyi-visual-monitor.jar"]
|
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-modules</artifactId>
|
||||
<version>3.6.4</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ruoyi-modules-btc</artifactId>
|
||||
|
||||
<description>
|
||||
ruoyi-modules-btc三方业务服务
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot Actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot Web -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- RuoYi Api System -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-api-system</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,20 @@
|
||||
package com.ruoyi.btc;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
|
||||
/**
|
||||
* 文件服务
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
|
||||
public class RuoYiBtcApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
SpringApplication.run(RuoYiBtcApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 文件服务模块启动成功 ლ(´ڡ`ლ)゙ \n");
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.ruoyi.btc.controller;
|
||||
|
||||
import com.ruoyi.btc.service.ISysPublicHalfService;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 半流程API接口写这里
|
||||
*
|
||||
* @author z
|
||||
*/
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("/half/api")
|
||||
@RequiredArgsConstructor
|
||||
public class PublicHalfController{
|
||||
private final ISysPublicHalfService sysPublicHalfService;
|
||||
|
||||
/**
|
||||
* 通用半流程撞库
|
||||
*/
|
||||
@PostMapping("check")
|
||||
public AjaxResult upload(MultipartFile file)
|
||||
{
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.ruoyi.btc.service;
|
||||
|
||||
/**
|
||||
* 文件上传接口
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface ISysPublicHalfService
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.ruoyi.btc.service.impl;
|
||||
|
||||
import com.ruoyi.btc.service.ISysPublicHalfService;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 本地文件存储
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Primary
|
||||
@Service
|
||||
public class SysPublicHalfServiceImpl implements ISysPublicHalfService
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
Spring Application Name: ${spring.application.name}
|
||||
_ __ _ _
|
||||
(_) / _|(_)| |
|
||||
_ __ _ _ ___ _ _ _ ______ | |_ _ | | ___
|
||||
| '__|| | | | / _ \ | | | || ||______|| _|| || | / _ \
|
||||
| | | |_| || (_) || |_| || | | | | || || __/
|
||||
|_| \__,_| \___/ \__, ||_| |_| |_||_| \___|
|
||||
__/ |
|
||||
|___/
|
@ -0,0 +1,27 @@
|
||||
# Tomcat
|
||||
server:
|
||||
port: 9301
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: ruoyi-btc
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 124.222.144.55:8848
|
||||
namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 124.222.144.55:8848
|
||||
namespace: 9a5181d5-598c-4b27-9644-ef14e7fd250c
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
@ -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/ruoyi-file" />
|
||||
<!-- 日志输出格式 -->
|
||||
<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>
|
||||
<!-- 日志最大的历史 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}/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.ruoyi" 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>
|
Loading…
Reference in new issue