This commit is contained in:
王奎兴
2026-04-30 14:57:13 +08:00
parent 7e00ca52c9
commit 0b141796a1
13 changed files with 671 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
# 基础镜像
FROM arm64v8/openjdk:8
# author
MAINTAINER manhuoda
#指定东八区时区
ENV TZ Asia/Shanghai
#指定utf-8编码格
ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8"
# VOLUME 指定了临时文件目录为/tmp。
# 其效果是在主机 /var/lib/docker 目录下创建了一个临时文件,并链接到容器的/tmp
VOLUME /tmp
#将当前jar 复制到容器根目录下
ADD target/mhd-bi.jar mhd-bi.jar
#暴露容器端口 Docker镜像告知Docker宿主机应用监听了端口
EXPOSE 9200
# 运行jar包
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-Xms1000m", "-Xmx1500m","-jar","/mhd-bi.jar"]
+180
View File
@@ -0,0 +1,180 @@
<?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>
<artifactId>mhd</artifactId>
<groupId>com.mhd</groupId>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>mhd-bi</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<!--添加web依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!--添加feign依赖 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-loadbalancer</artifactId>
</dependency>
<!--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>
<!-- Sentinel⽀持采⽤ Nacos 作为规则配置数据源,引⼊该适配依赖 -->
<dependency>
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-datasource-nacos</artifactId>
</dependency>
<!--sentinel 核⼼环境 依赖-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<!--链路追踪-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<!-- Jackson -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<!-- Alibaba Fastjson -->
<dependency>
<groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2</artifactId>
</dependency>
<!--spring cloud stream 依赖(rabbit-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
</dependency>
<!-- Mhd Common Core-->
<dependency>
<groupId>com.mhd</groupId>
<artifactId>mhd-common-core</artifactId>
</dependency>
<!-- Mhd Common Redis-->
<dependency>
<groupId>com.mhd</groupId>
<artifactId>mhd-common-redis</artifactId>
</dependency>
<dependency>
<groupId>com.dameng</groupId>
<artifactId>DmJdbcDriver18</artifactId>
<version>8.1.1.193</version>
</dependency>
<!--import mybatis plus 它会自动引入mybatis及mybatis spring切勿重复引用以免冲突-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.3.2</version>
</dependency>
<!--添加druid连接池 依赖 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.2.11</version>
</dependency>
<!--链路追踪-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
<version>2.2.8.RELEASE</version>
</dependency>
<!-- Mhd Common Security-->
<dependency>
<groupId>com.mhd</groupId>
<artifactId>mhd-common-security</artifactId>
</dependency>
<dependency>
<groupId>com.mhd</groupId>
<artifactId>mhd-api-system</artifactId>
</dependency>
<dependency>
<groupId>com.mhd</groupId>
<artifactId>mhd-common-log</artifactId>
</dependency>
<!-- net.sf.json -->
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
<classifier>jdk15</classifier>
</dependency>
<dependency>
<groupId>com.mhd</groupId>
<artifactId>mhd-common-datasource</artifactId>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.1.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>mhd-bi</id>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -0,0 +1,234 @@
package com.mhd.bi;
import com.mhd.common.core.annotation.fieldsetvalue.CommonService;
import com.mhd.common.core.annotation.fieldsetvalue.SetFeildValueAspect;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableAsync;
@SpringBootApplication(scanBasePackages = {"com.mhd", "com.mhd.bi"})
@EnableDiscoveryClient
@EnableFeignClients(basePackages = {"com.mhd","com.mhd.bi.infrastructure.feign"})
@MapperScan("com.mhd.bi.domain.**.mapper")
@Import({SetFeildValueAspect.class, CommonService.class})
@EnableAsync
public class BiApplication {
public static void main(String[] args) {
SpringApplication.run(BiApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 可视化页面模块启动成功 ლ(´ڡ`ლ)゙ " +
"# _oo0oo_\n" +
"# o8888888o\n" +
"# 88\" . \"88\n" +
"# (| -_- |)\n" +
"# 0\\ = /0\n" +
"# ___/`---'\\___\n" +
"# .' \\\\| |// '.\n" +
"# / \\\\||| : |||// \\\n" +
"# / _||||| -:- |||||- \\\n" +
"# | | \\\\\\ - /// | |\n" +
"# | \\_| ''\\---/'' |_/ |\n" +
"# \\ .-\\__ '-' ___/-. /\n" +
"# ___'. .' /--.--\\ `. .'___\n" +
"# .\"\" '< `.___\\_<|>_/___.' >' \"\".\n" +
"# | | : `- \\`.;`\\ _ /`;.`/ - ` : | |\n" +
"# \\ \\ `_. \\_ __\\ /__ _/ .-` / /\n" +
"# =====`-.____`.___ \\_____/___.-`___.-'=====\n" +
"# `=---='\n" +
"#\n" +
"#\n" +
"# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" +
"#\n" +
"# 佛祖保佑 永无BUG\n" +
"#\n" +
"#    ┏┓   ┏┓\n" +
"#   ┏┛┻━━━┛┻┓\n" +
"#   ┃       \n" +
"#   ┃   ━   \n" +
"#   ┃ ┳┛ ┗┳ ┃\n" +
"#   ┃       \n" +
"#   ┃   ┻   \n" +
"#   ┃       \n" +
"#   ┗━┓   ┏━┛Codes are far away from bugs with the animal protecting\n" +
"#     ┃   ┃ 神兽保佑,代码无bug\n" +
"#     ┃   ┃\n" +
"#     ┃   ┗━━━┓\n" +
"#     ┃      ┣┓\n" +
"#     ┃     ┏┛\n" +
"#     ┗┓┓┏━┳┓┏┛\n" +
"#      ┃┫┫ ┃┫┫\n" +
"#      ┗┻┛ ┗┻┛\n" +
"#\n" +
"#    ┏┓   ┏┓\n" +
"#   ┏┛┻━━━┛┻┓\n" +
"#   ┃        \n" +
"#   ┃   ━   \n" +
"#   ┃    <┃\n" +
"#   ┃       \n" +
"#   ┃ . ⌒ ..┃\n" +
"#   ┃       \n" +
"#   ┗━┓   ┏━┛\n" +
"#     ┃   ┃ Codes are far away from bugs with the animal protecting       \n" +
"#     ┃   ┃ 神兽保佑,代码无bug\n" +
"#     ┃   ┃           \n" +
"#     ┃   ┃       \n" +
"#     ┃   ┃\n" +
"#     ┃   ┃           \n" +
"#     ┃   ┗━━━┓\n" +
"#     ┃       ┣┓\n" +
"#     ┃       ┏┛\n" +
"#     ┗┓┓┏━┳┓┏┛\n" +
"#      ┃┫┫ ┃┫┫\n" +
"#      ┗┻┛ ┗┻┛\n" +
"# ┏┓   ┏┓+ +\n" +
"#   ┏┛┻━━━┛┻┓ + +\n" +
"#   ┃       ┃  \n" +
"#   ┃   ━   ┃ ++ + + +\n" +
"#   ████━████ ┃+\n" +
"#   ┃       ┃ +\n" +
"#   ┃   ┻   ┃\n" +
"#   ┃       ┃ + +\n" +
"#   ┗━┓   ┏━┛\n" +
"#     ┃   ┃           \n" +
"#     ┃   ┃ + + + +\n" +
"#     ┃   ┃    Codes are far away from bugs with the animal protecting   \n" +
"#     ┃   ┃ +     神兽保佑,代码无bug  \n" +
"#     ┃   ┃\n" +
"#     ┃   ┃  +         \n" +
"#     ┃    ┗━━━┓ + +\n" +
"#     ┃        ┣┓\n" +
"#     ┃        ┏┛\n" +
"#     ┗┓┓┏━┳┓┏┛ + + + +\n" +
"#      ┃┫┫ ┃┫┫\n" +
"#      ┗┻┛ ┗┻┛+ + + +\n" +
"# d*##$.\n" +
"# zP\"\"\"\"\"$e. $\" $o\n" +
"#4$ '$ $\" $\n" +
"#'$ '$ J$ $F\n" +
"# 'b $k $> $\n" +
"# $k $r J$ d$\n" +
"# '$ $ $\" $~\n" +
"# '$ \"$ '$E $\n" +
"# $ $L $\" $F ...\n" +
"# $. 4B $ $$$*\"\"\"*b\n" +
"# '$ $. $$ $$ $F\n" +
"# \"$ R$ $F $\" $\n" +
"# $k ?$ u* dF .$\n" +
"# ^$. $$\" z$ u$$$$e\n" +
"# #$b $E.dW@e$\" ?$\n" +
"# #$ .o$$# d$$$$c ?F\n" +
"# $ .d$$#\" . zo$> #$r .uF\n" +
"# $L .u$*\" $&$$$k .$$d$$F\n" +
"# $$\" \"\"^\"$$$P\"$P9$\n" +
"# JP .o$$$$u:$P $$\n" +
"# $ ..ue$\" \"\" $\"\n" +
"# d$ $F $\n" +
"# $$ ....udE 4B\n" +
"# #$ \"\"\"\"` $r @$\n" +
"# ^$L '$ $F\n" +
"# RN 4N $\n" +
"# *$b d$\n" +
"# $$k $F\n" +
"# $$b $F\n" +
"# $\"\" $F\n" +
"# '$ $\n" +
"# $L $\n" +
"# '$ $\n" +
"# $ $\n" +
"#\n" +
"#\n" +
"# ┌─┐ ┌─┐\n" +
"# ┌──┘ ┴───────┘ ┴──┐\n" +
"# │ │\n" +
"# │ ─── │\n" +
"# │ ─┬┘ └┬─ │\n" +
"# │ │\n" +
"# │ ─┴─ │\n" +
"# │ │\n" +
"# └───┐ ┌───┘\n" +
"# │ │\n" +
"# │ │\n" +
"# │ │\n" +
"# │ └──────────────┐\n" +
"# │ │\n" +
"# │ ├─┐\n" +
"# │ ┌─┘\n" +
"# │ │\n" +
"# └─┐ ┐ ┌───────┬──┐ ┌──┘\n" +
"# │ ─┤ ─┤ │ ─┤ ─┤\n" +
"# └──┴──┘ └──┴──┘\n" +
"# 神兽保佑\n" +
"# 代码无BUG!\n" +
"#\n" +
"# ___====-_ _-====___\n" +
"# _--^^^#####// \\\\#####^^^--_\n" +
"# _-^##########// ( ) \\\\##########^-_\n" +
"# -############// |\\^^/| \\\\############-\n" +
"# _/############// (@::@) \\\\############\\_\n" +
"# /#############(( \\\\// ))#############\\\n" +
"# -###############\\\\ (oo) //###############-\n" +
"# -#################\\\\ / VV \\ //#################-\n" +
"# -###################\\\\/ \\//###################-\n" +
"# _#/|##########/\\######( /\\ )######/\\##########|\\#_\n" +
"# |/ |#/\\#/\\#/\\/ \\#/\\##\\ | | /##/\\#/ \\/\\#/\\#/\\#| \\|\n" +
"# ` |/ V V ` V \\#\\| | | |/#/ V ' V V \\| '\n" +
"# ` ` ` ` / | | | | \\ ' ' ' '\n" +
"# ( | | | | )\n" +
"# __\\ | | | | /__\n" +
"# (vvv(VVV)(VVV)vvv)\n" +
"# 神兽保佑\n" +
"# 代码无BUG!\n" +
"# __----~~~~~~~~~~~------___\n" +
"# . . ~~//====...... __--~ ~~\n" +
"# -. \\_|// |||\\\\ ~~~~~~::::... /~\n" +
"# ___-==_ _-~o~ \\/ ||| \\\\ _/~~-\n" +
"# __---~~~.==~||\\=_ -_--~/_-~|- |\\\\ \\\\ _/~\n" +
"# _-~~ .=~ | \\\\-_ '-~7 /- / || \\ /\n" +
"# .~ .~ | \\\\ -_ / /- / || \\ /\n" +
"# / ____ / | \\\\ ~-_/ /|- _/ .|| \\ /\n" +
"# |~~ ~~|--~~~~--_ \\ ~==-/ | \\~--===~~ .\\\n" +
"# ' ~-| /| |-~\\~~ __--~~\n" +
"# |-~~-_/ | | ~\\_ _-~ /\\\n" +
"# / \\ \\__ \\/~ \\__\n" +
"# _--~ _/ | .-~~____--~-/ ~~==.\n" +
"# ((->/~ '.|||' -_| ~~-/ , . _||\n" +
"# -_ ~\\ ~~---l__i__i__i--~~_/\n" +
"# _-~-__ ~) \\--______________--~~\n" +
"# //.-~~~-~_--~- |-------~~~~~~~~\n" +
"# //.-~~~--\\\n" +
"# 神兽保佑\n" +
"# 代码无BUG!\n" +
"# ,----------------, ,---------,\n" +
"# ,-----------------------, ,\" ,\"|\n" +
"# ,\" ,\"| ,\" ,\" |\n" +
"# +-----------------------+ | ,\" ,\" |\n" +
"# | .-----------------. | | +---------+ |\n" +
"# | | | | | | -==----'| |\n" +
"# | | I LOVE DOS! | | | | | |\n" +
"# | | Bad command or | | |/----|`---= | |\n" +
"# | | C:\\>_ | | | ,/|==== ooo | ;\n" +
"# | | | | | // |(((( [33]| ,\"\n" +
"# | `-----------------' |,\" .;'| |(((( | ,\"\n" +
"# +-----------------------+ ;; | | |,\"\n" +
"# /_)______________(_/ //' | +---------+\n" +
"# ___________________________/___ `,\n" +
"# / oooooooooooooooo .o. oooo /, \\,\"-----------\n" +
"# / ==ooooooooooooooo==.o. ooo= // ,`\\--{)B ,\"\n" +
"# /_==__==========__==_ooo__ooo=_/' /___________,\"\n" +
"#\n" +
"# .-~~~~~~~~~-._ _.-~~~~~~~~~-.\n" +
"# __.' ~. .~ `.__\n" +
"# .'// \\./ \\\\`.\n" +
"# .'// | \\\\`.\n" +
"# .'// .-~\"\"\"\"\"\"\"~~~~-._ | _,-~~~~\"\"\"\"\"\"\"~-. \\\\`.\n" +
"# .'//.-\" `-. | .-' \"-.\\\\`.\n" +
"# .'//______.============-.. \\ | / ..-============.______\\\\`.\n" +
"# .'______________________________\\|/______________________________`.");
}
}
@@ -0,0 +1,28 @@
package com.mhd.bi.domain.testTable.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseVOEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class TestTable implements Serializable {
private static final long serialVersionUID = 1L;
/** 车队id */
@ApiModelProperty("车队id")
@TableId(type = IdType.AUTO)
private Long id;
@ApiModelProperty(name = "txt")
private String txt;
}
@@ -0,0 +1,8 @@
package com.mhd.bi.domain.testTable.repository.facade;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mhd.bi.domain.testTable.entity.TestTable;
public interface TestTableService extends IService<TestTable>
{
}
@@ -0,0 +1,16 @@
package com.mhd.bi.domain.testTable.repository.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mhd.bi.domain.testTable.entity.TestTable;
import java.util.List;
/**
* 车队Mapper接口
*
* @author zihao
* @date 2023-05-24
*/
public interface TestTableMapper extends BaseMapper<TestTable>
{
}
@@ -0,0 +1,16 @@
package com.mhd.bi.domain.testTable.repository.persistence;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mhd.bi.domain.testTable.entity.TestTable;
import com.mhd.bi.domain.testTable.repository.facade.TestTableService;
import com.mhd.bi.domain.testTable.repository.mapper.TestTableMapper;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Service
public class TestTableServiceImpl extends ServiceImpl<TestTableMapper, TestTable> implements TestTableService {
}
@@ -0,0 +1,45 @@
package com.mhd.bi.interfaces.facadeApi.testTable;
import com.mhd.bi.domain.testTable.entity.TestTable;
import com.mhd.bi.domain.testTable.repository.facade.TestTableService;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Api(tags = "test")
@Slf4j
@RestController
@RequestMapping("/testTableApi")
@CrossOrigin
public class TestTableApi extends BaseController {
@Autowired
private TestTableService testTableService;
@ApiOperation("查询用户列表")
@GetMapping("/test")
public AjaxResult test(String txt) {
String result = txt;
return AjaxResult.success(result);
}
@ApiOperation("查询用户列表")
@GetMapping("/list")
public AjaxResult list(String txt) {
List<TestTable> list = testTableService.list();
return AjaxResult.success(list);
}
}
+10
View File
@@ -0,0 +1,10 @@
Spring Boot Version: ${spring-boot.version}
Spring Application Name: ${spring.application.name}
_ _ _
(_) | | | |
_ __ _ _ ___ _ _ _ ______ __ _ _ _ | |_ | |__
| '__|| | | | / _ \ | | | || ||______| / _` || | | || __|| '_ \
| | | |_| || (_) || |_| || | | (_| || |_| || |_ | | | |
|_| \__,_| \___/ \__, ||_| \__,_| \__,_| \__||_| |_|
__/ |
|___/
+35
View File
@@ -0,0 +1,35 @@
# Tomcat
server:
port: 8021
# Spring
spring:
application:
# 应用名称
name: mhd-bi-service
profiles:
# 环境配置
active: dev
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
# 线上测试环境配置 容器名+端口号
# server-addr: 10.102.192.5:6848
# username: nacos
# password: manhuoda@2023
#线上正式环境
# server-addr: 10.102.192.5:6848
# username: nacos
# password: manhuoda@2023
config:
server-addr: 127.0.0.1:8848
# 线上测试环境配置 容器名+端口号
# server-addr: 10.102.192.5:6848
# username: nacos
# password: manhuoda@2023
#线上正式环境
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
file-extension: yml #默认properties
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+74
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/mhd-bi" />
<!-- 日志输出格式 -->
<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.mhd" 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>
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mhd.bi.domain.testTable.repository.mapper.TestTableMapper">
</mapper>
+1
View File
@@ -302,6 +302,7 @@
<module>mhd_oms</module> <module>mhd_oms</module>
<module>mhd_wms</module> <module>mhd_wms</module>
<module>mhd_bms</module> <module>mhd_bms</module>
<module>mhd-bi</module>
</modules> </modules>
<packaging>pom</packaging> <packaging>pom</packaging>