若依微服务1.04版本,主要支持tdengine服务
1、创建数据库 2、创建超级表 3、创建子表 4、添加超级表column 5、删除超级表column 6、插入数据 7、获取子表最新数据 8、根据tags获取超级表最新数据 9、获取历史数据 10、获取历史数据数量master
parent
854309654d
commit
08c2a39100
@ -0,0 +1,28 @@
|
|||||||
|
<?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-api</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>hw-api-tdengine</artifactId>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
hw-api-tdengine时序数据库接口模块
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- RuoYi Common Core-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
@ -0,0 +1,55 @@
|
|||||||
|
package com.ruoyi.tdengine.api;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.hw.validated.tdengine.AddTdSTableColumn;
|
||||||
|
import com.ruoyi.common.core.hw.validated.tdengine.InsertTdTable;
|
||||||
|
import com.ruoyi.tdengine.api.domain.TdHistorySelectDto;
|
||||||
|
import com.ruoyi.tdengine.api.domain.TdSelectDto;
|
||||||
|
import com.ruoyi.tdengine.api.domain.TdSuperTableVo;
|
||||||
|
import com.ruoyi.tdengine.api.domain.TdTableVo;
|
||||||
|
import com.ruoyi.tdengine.api.factory.RemoteTdEngineFallbackFactory;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@FeignClient(contextId = "remoteTdEngineService", value = ServiceNameConstants.TDENGINE_SERVICE, fallbackFactory = RemoteTdEngineFallbackFactory.class)
|
||||||
|
public interface RemoteTdEngineService {
|
||||||
|
|
||||||
|
@PostMapping("/tdengine/createDatabase")
|
||||||
|
R<?> createDataBase(@RequestParam("databaseName") String databaseName);
|
||||||
|
|
||||||
|
@PostMapping("/tdengine/createSuperTable")
|
||||||
|
R<?> createSuperTable(@Validated @RequestBody TdSuperTableVo tdSuperTableVo);
|
||||||
|
|
||||||
|
@PostMapping("/tdengine/createTable")
|
||||||
|
R<?> createTable(@Validated @RequestBody TdTableVo tdTableVo);
|
||||||
|
|
||||||
|
@PostMapping("/tdengine/addSuperTableColumn")
|
||||||
|
R<?> addSuperTableColumn(@Validated(AddTdSTableColumn.class) @RequestBody TdSuperTableVo tdSuperTableVo);
|
||||||
|
|
||||||
|
@PostMapping("/tdengine/dropSuperTableColumn")
|
||||||
|
R<?> dropColumnForSuperTable(@Validated(AddTdSTableColumn.class) @RequestBody TdSuperTableVo tdSuperTableVo);
|
||||||
|
|
||||||
|
@PostMapping("/tdengine/insertTable")
|
||||||
|
R<?> insertTable(@Validated(InsertTdTable.class) @RequestBody TdTableVo tdTableVo);
|
||||||
|
|
||||||
|
@PostMapping("/tdengine/getLatestData")
|
||||||
|
R<?> getLatestData(@Validated @RequestBody TdSelectDto tdSelectDto);
|
||||||
|
|
||||||
|
@PostMapping("/tdengine/getLatestDataByTags")
|
||||||
|
R<Map<String, Map<String, Object>>> getLatestDataByTags(@RequestBody TdSelectDto tdSelectDto);
|
||||||
|
|
||||||
|
@PostMapping("/tdengine/getHistoryData")
|
||||||
|
R<?> getHistoryData(@Validated @RequestBody TdHistorySelectDto tdHistorySelectDto);
|
||||||
|
|
||||||
|
@PostMapping("/tdengine/getCountOfHistoryData")
|
||||||
|
R<?> getCountOfHistoryData(@Validated @RequestBody TdHistorySelectDto tdHistorySelectDto);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.ruoyi.tdengine.api.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: TDengine查询数据入参数据传输对象
|
||||||
|
* @ClassName: TdSelectDto
|
||||||
|
* @Author : xins
|
||||||
|
* @Date :2023-08-29 10:39
|
||||||
|
* @Version :1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class TdSelectDto {
|
||||||
|
|
||||||
|
//数据库名称
|
||||||
|
@NotBlank(message="databaseName cannot be empty")
|
||||||
|
private String databaseName;
|
||||||
|
|
||||||
|
//子表名称
|
||||||
|
@NotBlank(message="tableName cannot be empty")
|
||||||
|
private String tableName;
|
||||||
|
|
||||||
|
//超级表名称
|
||||||
|
private String superTableName;
|
||||||
|
|
||||||
|
//tags名称
|
||||||
|
private String tagsName;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,76 @@
|
|||||||
|
package com.ruoyi.tdengine.api.factory;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.tdengine.api.RemoteTdEngineService;
|
||||||
|
import com.ruoyi.tdengine.api.domain.TdHistorySelectDto;
|
||||||
|
import com.ruoyi.tdengine.api.domain.TdSelectDto;
|
||||||
|
import com.ruoyi.tdengine.api.domain.TdSuperTableVo;
|
||||||
|
import com.ruoyi.tdengine.api.domain.TdTableVo;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class RemoteTdEngineFallbackFactory implements FallbackFactory<RemoteTdEngineService> {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(RemoteTdEngineFallbackFactory.class);
|
||||||
|
@Override
|
||||||
|
public RemoteTdEngineService create(Throwable throwable) {
|
||||||
|
return new RemoteTdEngineService()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public R<?> createDataBase(String databaseName) {
|
||||||
|
return R.fail("创建数据库失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> createSuperTable(TdSuperTableVo tdSuperTableVo) {
|
||||||
|
return R.fail("创建超级表失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> createTable(TdTableVo tdTableVo) {
|
||||||
|
return R.fail("创建子表失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> addSuperTableColumn(TdSuperTableVo tdSuperTableVo) {
|
||||||
|
return R.fail("添加超级表Column失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> dropColumnForSuperTable(TdSuperTableVo tdSuperTableVo) {
|
||||||
|
return R.fail("删除超级表Column失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> insertTable(TdTableVo tdTableVo) {
|
||||||
|
return R.fail("插入数据失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> getLatestData(TdSelectDto tdSelectDto) {
|
||||||
|
return R.fail("获取子表最新数据失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<Map<String, Map<String, Object>>> getLatestDataByTags(TdSelectDto tdSelectDto) {
|
||||||
|
return R.fail("根据tags获取超级表最新数据失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> getHistoryData(TdHistorySelectDto tdHistorySelectDto) {
|
||||||
|
return R.fail("获取历史数据失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<?> getCountOfHistoryData(TdHistorySelectDto tdHistorySelectDto) {
|
||||||
|
return R.fail("获取历史数据数量失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
user.login.username=\u7528\u6237\u540D
|
||||||
|
user.login.password=\u5BC6\u7801
|
||||||
|
user.login.code=\u9A8C\u8BC1\u7801
|
||||||
|
user.login.remember=\u8BB0\u4F4F\u6211
|
||||||
|
user.login.submit=\u767B\u5F55
|
||||||
|
|
||||||
|
|
||||||
|
menu.system.management=\u7CFB\u7EDF\u7BA1\u7406
|
||||||
|
|
||||||
|
|
||||||
|
tdengine.supertable1.pressure=yali
|
@ -0,0 +1,8 @@
|
|||||||
|
package com.ruoyi.common.core.constant;
|
||||||
|
|
||||||
|
public class TdEngineConstants {
|
||||||
|
|
||||||
|
public static final String DEFAULT_FIRST_FIELD_NAME = "ts";
|
||||||
|
|
||||||
|
public static final String DEFAULT_ORDER_BY_MODE = "desc";
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
package com.ruoyi.common.core.hw.validated.tdengine;
|
||||||
|
|
||||||
|
public interface AddTdSTableColumn {
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
package com.ruoyi.common.core.hw.validated.tdengine;
|
||||||
|
|
||||||
|
public interface InsertTdTable {
|
||||||
|
}
|
@ -0,0 +1,106 @@
|
|||||||
|
<?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.3</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>ruoyi-modules-tdengine</artifactId>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
ruoyi-modules-tdengine 时序数据库处理模块
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<!-- Swagger UI -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.springfox</groupId>
|
||||||
|
<artifactId>springfox-swagger-ui</artifactId>
|
||||||
|
<version>${swagger.fox.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- RuoYi Common DataSource -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common-datasource</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- RuoYi Common DataScope -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common-datascope</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- RuoYi Common Log -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common-log</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- RuoYi Common Swagger -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common-swagger</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- TDengine -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.taosdata.jdbc</groupId>
|
||||||
|
<artifactId>taos-jdbcdriver</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>hw-api-tdengine</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</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,34 @@
|
|||||||
|
package com.ruoyi.tdengine;
|
||||||
|
|
||||||
|
import com.ruoyi.common.security.annotation.EnableCustomConfig;
|
||||||
|
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
|
||||||
|
import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统模块
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
@EnableCustomConfig
|
||||||
|
@EnableCustomSwagger2
|
||||||
|
@EnableRyFeignClients
|
||||||
|
@SpringBootApplication
|
||||||
|
public class HwTdengineApplication
|
||||||
|
{
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
SpringApplication.run(HwTdengineApplication.class, args);
|
||||||
|
System.out.println("(♥◠‿◠)ノ゙ 时序数据库模块启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||||
|
" .-------. ____ __ \n" +
|
||||||
|
" | _ _ \\ \\ \\ / / \n" +
|
||||||
|
" | ( ' ) | \\ _. / ' \n" +
|
||||||
|
" |(_ o _) / _( )_ .' \n" +
|
||||||
|
" | (_,_).' __ ___(_ o _)' \n" +
|
||||||
|
" | |\\ \\ | || |(_,_)' \n" +
|
||||||
|
" | | \\ `' /| `-' / \n" +
|
||||||
|
" | | \\ / \\ / \n" +
|
||||||
|
" ''-' `'-' `-..-' ");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
Spring Boot Version: ${spring-boot.version}
|
||||||
|
Spring Application Name: ${spring.application.name}
|
||||||
|
_ _
|
||||||
|
(_) | |
|
||||||
|
_ __ _ _ ___ _ _ _ ______ ___ _ _ ___ | |_ ___ _ __ ___
|
||||||
|
| '__|| | | | / _ \ | | | || ||______|/ __|| | | |/ __|| __| / _ \| '_ ` _ \
|
||||||
|
| | | |_| || (_) || |_| || | \__ \| |_| |\__ \| |_ | __/| | | | | |
|
||||||
|
|_| \__,_| \___/ \__, ||_| |___/ \__, ||___/ \__| \___||_| |_| |_|
|
||||||
|
__/ | __/ |
|
||||||
|
|___/ |___/
|
@ -0,0 +1,25 @@
|
|||||||
|
# Tomcat
|
||||||
|
server:
|
||||||
|
port: 9602
|
||||||
|
|
||||||
|
# Spring
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
# 应用名称
|
||||||
|
name: hw-tdengine
|
||||||
|
profiles:
|
||||||
|
# 环境配置
|
||||||
|
active: dev
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
# 服务注册地址
|
||||||
|
server-addr: 127.0.0.1:8848
|
||||||
|
config:
|
||||||
|
# 配置中心地址
|
||||||
|
server-addr: 127.0.0.1:8848
|
||||||
|
# 配置文件格式
|
||||||
|
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/hw-tdengine" />
|
||||||
|
<!-- 日志输出格式 -->
|
||||||
|
<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