马府强
1 year ago
27 changed files with 1254 additions and 0 deletions
@ -0,0 +1,27 @@ |
|||
# Created by .ignore support plugin (hsz.mobi) |
|||
### Java template |
|||
# Compiled class file |
|||
*.class |
|||
|
|||
# Log file |
|||
*.log |
|||
|
|||
# BlueJ files |
|||
*.ctxt |
|||
|
|||
# Mobile Tools for Java (J2ME) |
|||
.mtj.tmp/ |
|||
|
|||
# Package Files # |
|||
*.jar |
|||
*.war |
|||
*.nar |
|||
*.ear |
|||
*.zip |
|||
*.tar.gz |
|||
*.rar |
|||
|
|||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml |
|||
hs_err_pid* |
|||
/.idea/ |
|||
/target/ |
@ -0,0 +1,202 @@ |
|||
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
<parent> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-parent</artifactId> |
|||
<version>2.3.9.RELEASE</version> |
|||
<relativePath/> <!-- lookup parent from repository --> |
|||
</parent> |
|||
|
|||
<groupId>com.ayi</groupId> |
|||
<artifactId>woniu-web</artifactId> |
|||
<version>0.0.1-SNAPSHOT</version> |
|||
<name>woniu-web</name> |
|||
<description>create by woniu</description> |
|||
|
|||
<packaging>jar</packaging> |
|||
|
|||
<properties> |
|||
<java.version>1.8</java.version> |
|||
</properties> |
|||
|
|||
<dependencies> |
|||
|
|||
<dependency> |
|||
<groupId>com.baomidou</groupId> |
|||
<artifactId>mybatis-plus-boot-starter</artifactId> |
|||
<version>3.5.2</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.github.rholder</groupId> |
|||
<artifactId>guava-retrying</artifactId> |
|||
<version>2.0.0</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>com.google.guava</groupId> |
|||
<artifactId>guava</artifactId> |
|||
<version>29.0-jre</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.lionsoul</groupId> |
|||
<artifactId>ip2region</artifactId> |
|||
<version>2.7.0</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-aop</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>cn.hutool</groupId> |
|||
<artifactId>hutool-all</artifactId> |
|||
<version>5.3.3</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-web</artifactId> |
|||
</dependency> |
|||
|
|||
|
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-test</artifactId> |
|||
<!-- <scope>test</scope>--> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.projectlombok</groupId> |
|||
<artifactId>lombok</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-cache</artifactId> |
|||
</dependency> |
|||
<!--Swagger 依赖--> |
|||
<dependency> |
|||
<groupId>io.springfox</groupId> |
|||
<artifactId>springfox-swagger2</artifactId> |
|||
<version>2.9.2</version> |
|||
</dependency> |
|||
<!--Swagger-ui 依赖--> |
|||
<dependency> |
|||
<groupId>io.springfox</groupId> |
|||
<artifactId>springfox-swagger-ui</artifactId> |
|||
<version>2.9.2</version> |
|||
</dependency> |
|||
|
|||
|
|||
<!-- 集成mybatis --> |
|||
<!-- <dependency>--> |
|||
<!-- <groupId>org.mybatis.spring.boot</groupId>--> |
|||
<!-- <artifactId>mybatis-spring-boot-starter</artifactId>--> |
|||
<!-- <version>1.3.2</version>--> |
|||
<!-- </dependency>--> |
|||
<!-- https://mvnrepository.com/artifact/com.alibaba/druid-spring-boot-starter --> |
|||
<dependency> |
|||
<groupId>com.alibaba</groupId> |
|||
<artifactId>druid-spring-boot-starter</artifactId> |
|||
<version>1.2.18</version> |
|||
</dependency> |
|||
|
|||
|
|||
<!--引入阿里巴巴druid连接池--> |
|||
|
|||
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java --> |
|||
<dependency> |
|||
<groupId>mysql</groupId> |
|||
<artifactId>mysql-connector-java</artifactId> |
|||
<version>8.0.29</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>com.alipay.sofa</groupId> |
|||
<artifactId>runtime-sofa-boot-starter</artifactId> |
|||
<version>3.18.0</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-validation</artifactId> |
|||
</dependency> |
|||
|
|||
<!-- <dependency>–>--> |
|||
<!-- <groupId>org.springframework.boot</groupId>--> |
|||
<!-- <artifactId>spring-boot-starter-data-redis</artifactId>--> |
|||
<!-- </dependency>--> |
|||
|
|||
<!-- <dependency>--> |
|||
<!-- <groupId>org.redisson</groupId>--> |
|||
<!-- <artifactId>redisson</artifactId>--> |
|||
<!-- <version>3.21.0</version>--> |
|||
<!-- </dependency>--> |
|||
<!-- <dependency>--> |
|||
<!-- <groupId>org.springframework.boot</groupId>--> |
|||
<!-- <artifactId>spring-boot-starter-data-redis</artifactId>--> |
|||
<!-- <version>2.1.18.RELEASE</version>--> |
|||
<!-- <exclusions>--> |
|||
<!-- <exclusion>--> |
|||
<!-- <groupId>ch.qos.logback</groupId>--> |
|||
<!-- <artifactId>logback-classic</artifactId>--> |
|||
<!-- </exclusion>--> |
|||
<!-- <exclusion>--> |
|||
<!-- <groupId>org.slf4j</groupId>--> |
|||
<!-- <artifactId>jul-to-slf4j</artifactId>--> |
|||
<!-- </exclusion>--> |
|||
<!-- <exclusion>--> |
|||
<!-- <groupId>org.springframework.boot</groupId>--> |
|||
<!-- <artifactId>spring-boot-starter-logging</artifactId>--> |
|||
<!-- </exclusion>--> |
|||
<!-- <exclusion>--> |
|||
<!-- <artifactId>lettuce-core</artifactId>--> |
|||
<!-- <groupId>io.lettuce</groupId>--> |
|||
<!-- </exclusion>--> |
|||
<!-- </exclusions>--> |
|||
<!-- </dependency>--> |
|||
<!-- <!– https://mvnrepository.com/artifact/redis.clients/jedis –>--> |
|||
<!-- <dependency>--> |
|||
<!-- <groupId>redis.clients</groupId>--> |
|||
<!-- <artifactId>jedis</artifactId>--> |
|||
<!-- <version>4.4.3</version>--> |
|||
<!-- </dependency>--> |
|||
|
|||
<!-- 不可升级,3.x以上最低jdk11--> |
|||
<dependency> |
|||
<groupId>com.github.ben-manes.caffeine</groupId> |
|||
<artifactId>caffeine</artifactId> |
|||
<version>2.9.3</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>com.alibaba</groupId> |
|||
<artifactId>fastjson</artifactId> |
|||
<version>1.2.76</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.alibaba</groupId> |
|||
<artifactId>easyexcel</artifactId> |
|||
<version>3.0.5</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.testng</groupId> |
|||
<artifactId>testng</artifactId> |
|||
<version>RELEASE</version> |
|||
<scope>compile</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
<build> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
</plugin> |
|||
</plugins> |
|||
</build> |
|||
|
|||
</project> |
@ -0,0 +1,21 @@ |
|||
package com.woniu; |
|||
|
|||
import org.mybatis.spring.annotation.MapperScan; |
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
import org.springframework.scheduling.annotation.EnableAsync; |
|||
import org.springframework.scheduling.annotation.EnableScheduling; |
|||
|
|||
|
|||
@SpringBootApplication |
|||
@MapperScan("com.woniu.logger.mapper") |
|||
@EnableAsync |
|||
@EnableScheduling |
|||
public class WoNiuApplication { |
|||
|
|||
public static void main(String[] args) { |
|||
SpringApplication.run(WoNiuApplication.class, args); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.woniu.controller; |
|||
|
|||
import com.woniu.service.RedisIdempotentStorage; |
|||
import com.woniu.utils.IdGeneratorUtil; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
/** |
|||
* 一个注解,优雅的实现接口幂等性! |
|||
* |
|||
* 关键因素1 |
|||
* 幂等唯一标识,就是客户端与服务端一次请求时的唯一标识,一般情况下由客户端来生成,也可以让第三方来统一分配。 |
|||
* |
|||
* 关键因素2 |
|||
* 有了唯一标识以后,服务端只需要确保这个唯一标识只被使用一次即可,一种常见的方式就是利用数据库的唯一索引。 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/generate") |
|||
public class IdGeneratorController { |
|||
@Resource |
|||
private RedisIdempotentStorage redisIdempotentStorage; |
|||
|
|||
@RequestMapping("/getIdGeneratorToken") |
|||
@ResponseBody |
|||
public String getIdGeneratorToken() { |
|||
String generateId = IdGeneratorUtil.generateId(); |
|||
redisIdempotentStorage.save(generateId); |
|||
return generateId; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.woniu.controller; |
|||
|
|||
import com.woniu.req.Order; |
|||
import com.woniu.req.RequestData; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
@RestController |
|||
@RequestMapping("/order") |
|||
public class OrderController { |
|||
|
|||
@RequestMapping("/saveOrder") |
|||
public String saveOrder(@RequestBody RequestData<Order> requestData) { |
|||
return "success"; |
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,15 @@ |
|||
package com.woniu.controller; |
|||
|
|||
|
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
@RestController |
|||
@RequestMapping("/test") |
|||
public class TestController { |
|||
|
|||
@RequestMapping("/hello") |
|||
public String hello() { |
|||
return "success"; |
|||
} |
|||
} |
@ -0,0 +1,66 @@ |
|||
package com.woniu.logger; |
|||
|
|||
|
|||
import com.baomidou.mybatisplus.annotation.DbType; |
|||
import com.baomidou.mybatisplus.extension.toolkit.JdbcUtils; |
|||
|
|||
import com.woniu.logger.conf.LoggerConfig; |
|||
import com.woniu.logger.sql.DdlSqlFactory; |
|||
import com.woniu.logger.sql.IDdlSql; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.boot.CommandLineRunner; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import javax.sql.DataSource; |
|||
import java.sql.Connection; |
|||
import java.sql.ResultSet; |
|||
import java.sql.SQLException; |
|||
import java.sql.Statement; |
|||
|
|||
/** |
|||
* 功能描述: 日志信息启动执行 <br/> |
|||
* 日志备份,创建日志表等操作 |
|||
*/ |
|||
@Component |
|||
public class LoggerInfoApplicationListener implements CommandLineRunner { |
|||
|
|||
@Autowired |
|||
private DataSource dataSource; |
|||
@Autowired |
|||
private LoggerConfig loggerConfig; |
|||
private IDdlSql ddl; |
|||
|
|||
@Override |
|||
public void run(String... args) throws Exception { |
|||
// 判断数据库类型
|
|||
Connection conn = dataSource.getConnection(); |
|||
try (Statement statement = conn.createStatement()) { |
|||
DbType dbType = JdbcUtils.getDbType(conn.getMetaData().getURL()); |
|||
ddl = DdlSqlFactory.valueOf(dbType.name()).getDdl(); |
|||
// 查询表有没有存在
|
|||
if (!existTable(statement)) { |
|||
createTable(statement); |
|||
} |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 功能描述: 建表 <br/> |
|||
*/ |
|||
private void createTable(Statement statement) throws SQLException { |
|||
statement.execute(ddl.createTable()); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 功能描述: 是否存在表 <br/> |
|||
*/ |
|||
private boolean existTable(Statement statement) throws SQLException { |
|||
ResultSet resultSet = statement.executeQuery(ddl.queryTable("")); |
|||
resultSet.next(); |
|||
return resultSet.getInt(1) == 1; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,77 @@ |
|||
package com.woniu.logger; |
|||
import cn.hutool.core.date.DatePattern; |
|||
import cn.hutool.core.date.DateUtil; |
|||
import com.baomidou.mybatisplus.annotation.DbType; |
|||
import com.baomidou.mybatisplus.extension.toolkit.JdbcUtils; |
|||
|
|||
import com.woniu.logger.conf.LoggerConfig; |
|||
import com.woniu.logger.conf.LoggerLevelEnum; |
|||
import com.woniu.logger.sql.DdlSqlFactory; |
|||
import com.woniu.logger.sql.IDdlSql; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.scheduling.annotation.Scheduled; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import javax.sql.DataSource; |
|||
import java.sql.Connection; |
|||
import java.sql.ResultSet; |
|||
import java.sql.SQLException; |
|||
import java.sql.Statement; |
|||
|
|||
|
|||
|
|||
/** |
|||
* 功能描述: 日志备份任务 <br/> |
|||
*/ |
|||
@Component |
|||
public class LoggerInfoBackTask { |
|||
|
|||
@Autowired |
|||
private DataSource dataSource; |
|||
@Autowired |
|||
private LoggerConfig loggerConfig; |
|||
|
|||
private IDdlSql ddl; |
|||
|
|||
/** |
|||
* 功能描述: 每天0点1秒开始执行备份表(确定日期) <br/> |
|||
*/ |
|||
@Scheduled(cron = "1 0 0 * * ?") |
|||
public void backTask() throws Throwable { |
|||
if (LoggerLevelEnum.NONE.equals(loggerConfig.getLevel())) { |
|||
return; |
|||
} |
|||
Connection conn = dataSource.getConnection(); |
|||
try (Statement statement = conn.createStatement()) { |
|||
DbType dbType = JdbcUtils.getDbType(conn.getMetaData().getURL()); |
|||
ddl = DdlSqlFactory.valueOf(dbType.name()).getDdl(); |
|||
String yesterday = DateUtil.format(DateUtil.yesterday(), DatePattern.PURE_DATE_FORMAT); |
|||
// 查询表有没有存在
|
|||
if (!existTable(statement, yesterday)) { |
|||
backTable(statement, yesterday); |
|||
} |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 功能描述: 每日备份操作 <br/> |
|||
*/ |
|||
public void backTable(Statement statement, String yesterday) throws SQLException { |
|||
// 先备份
|
|||
statement.execute(ddl.backTable(yesterday)); |
|||
// 再创建表
|
|||
statement.execute(ddl.createTable()); |
|||
} |
|||
|
|||
/** |
|||
* 功能描述: 是否存在表 <br/> |
|||
*/ |
|||
private boolean existTable(Statement statement, String yesterday) throws SQLException { |
|||
ResultSet resultSet = statement.executeQuery(ddl.queryTable(yesterday)); |
|||
resultSet.next(); |
|||
return resultSet.getInt(1) == 1; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,90 @@ |
|||
package com.woniu.logger.aspect; |
|||
|
|||
|
|||
import cn.hutool.core.net.NetUtil; |
|||
import cn.hutool.json.JSONUtil; |
|||
|
|||
import com.woniu.logger.conf.LoggerConfig; |
|||
import com.woniu.logger.conf.LoggerLevelEnum; |
|||
import com.woniu.logger.entity.LoggerInfoEntity; |
|||
import com.woniu.logger.service.ILoggerInfoService; |
|||
import com.woniu.logger.util.HttpRequestUtil; |
|||
import org.aspectj.lang.ProceedingJoinPoint; |
|||
import org.aspectj.lang.annotation.Around; |
|||
import org.aspectj.lang.annotation.Aspect; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.core.annotation.Order; |
|||
import org.springframework.stereotype.Component; |
|||
import org.springframework.web.context.request.RequestContextHolder; |
|||
import org.springframework.web.context.request.ServletRequestAttributes; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import java.util.Optional; |
|||
|
|||
/** |
|||
* 功能描述: 日志切面 <br/> |
|||
* 请求与响应参数日志记录框架 |
|||
*/ |
|||
@Order(99) |
|||
@Aspect |
|||
@Component |
|||
public class RequestLogAspect { |
|||
|
|||
@Autowired |
|||
private LoggerConfig loggerConfig; |
|||
@Autowired |
|||
private ILoggerInfoService loggerInfoService; |
|||
|
|||
@Around("execution(* com.woniu.controller..*.*(..))") |
|||
public Object doAround(ProceedingJoinPoint point) throws Throwable { |
|||
// 如果没有开启,则直接返回
|
|||
if (LoggerLevelEnum.NONE.equals(loggerConfig.getLevel())) { |
|||
return point.proceed(); |
|||
} |
|||
long startTime = System.currentTimeMillis(); |
|||
LoggerInfoEntity info = new LoggerInfoEntity(); |
|||
// 设置url
|
|||
info.setUrl(Optional.ofNullable((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).map(ServletRequestAttributes::getRequest).map(HttpServletRequest::getRequestURI).orElse("")); |
|||
// 设置类名
|
|||
info.setClassName(point.getTarget().getClass().getName()); |
|||
// 设置方法名
|
|||
info.setMethodName(point.getSignature().getName()); |
|||
// 设置请求IP地址
|
|||
info.setReqIpAdr(HttpRequestUtil.getRealIpAddress()); |
|||
// 设置响应IP地址
|
|||
info.setRspIpAdr(NetUtil.getLocalhostStr()); |
|||
// 设置请求头
|
|||
info.setReqHeader(JSONUtil.toJsonStr(HttpRequestUtil.getHeader())); |
|||
// 设置请求体
|
|||
info.setReqBody(JSONUtil.toJsonStr(point.getArgs())); |
|||
// 设置请求成功
|
|||
info.setSuccessInd(Boolean.TRUE); |
|||
// 定义返回值
|
|||
Object obj; |
|||
try { |
|||
Object result = point.proceed(); |
|||
info.setRspBody(JSONUtil.toJsonStr(result)); |
|||
obj = result; |
|||
} catch (Exception e) { |
|||
// 设置请求异常
|
|||
info.setSuccessInd(Boolean.FALSE); |
|||
// 设置异常信息
|
|||
info.setErrorMsg(e.getLocalizedMessage()); |
|||
throw e; |
|||
} finally { |
|||
// 计算处理时间
|
|||
info.setTotalTime(System.currentTimeMillis() - startTime); |
|||
// 如果为全部打印或正常打印,并且为正常标志,记录
|
|||
if (LoggerLevelEnum.ALL.equals(loggerConfig.getLevel()) || (LoggerLevelEnum.PRINT.equals(loggerConfig.getLevel()) && info.getSuccessInd())) { |
|||
loggerInfoService.saveAsync(info); |
|||
} |
|||
// 如果为全部打印或者异常打印,并且为异常标志,记录
|
|||
if (LoggerLevelEnum.ALL.equals(loggerConfig.getLevel()) || (LoggerLevelEnum.ERROR.equals(loggerConfig.getLevel())) && !info.getSuccessInd()) { |
|||
loggerInfoService.saveAsync(info); |
|||
} |
|||
} |
|||
return obj; |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,17 @@ |
|||
package com.woniu.logger.conf; |
|||
|
|||
|
|||
import lombok.Data; |
|||
import org.springframework.boot.context.properties.ConfigurationProperties; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
@Data |
|||
@Component |
|||
@ConfigurationProperties(prefix = "logger.project") |
|||
public class LoggerConfig { |
|||
|
|||
/** 定义日志级别 */ |
|||
private LoggerLevelEnum level = LoggerLevelEnum.NONE; |
|||
|
|||
} |
|||
|
@ -0,0 +1,26 @@ |
|||
package com.woniu.logger.conf; |
|||
|
|||
|
|||
/** |
|||
* 功能描述: 日志级别枚举 <br/> |
|||
*/ |
|||
public enum LoggerLevelEnum { |
|||
|
|||
/** |
|||
* 不打印 |
|||
*/ |
|||
NONE, |
|||
/** |
|||
* 打印正常 |
|||
*/ |
|||
PRINT, |
|||
/** |
|||
* 打印异常 |
|||
*/ |
|||
ERROR, |
|||
/** |
|||
* 全部打印 |
|||
*/ |
|||
ALL, |
|||
|
|||
} |
@ -0,0 +1,70 @@ |
|||
package com.woniu.logger.entity; |
|||
|
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.time.LocalDate; |
|||
|
|||
@Data |
|||
@TableName(LoggerInfoEntity.TABLE_NAME) |
|||
@ApiModel("日志信息") |
|||
public class LoggerInfoEntity { |
|||
|
|||
public static final String TABLE_NAME = "logger_info"; |
|||
|
|||
@ApiModelProperty("主键ID") |
|||
@TableId(value = "id", type = IdType.AUTO) |
|||
private Long id; |
|||
|
|||
@ApiModelProperty("访问的url") |
|||
@TableField("url") |
|||
private String url; |
|||
|
|||
@ApiModelProperty("类名") |
|||
@TableField("class_name") |
|||
private String className; |
|||
|
|||
@ApiModelProperty("方法名") |
|||
@TableField("method_name") |
|||
private String methodName; |
|||
|
|||
@ApiModelProperty("请求的ip地址") |
|||
@TableField("req_ip_adr") |
|||
private String reqIpAdr; |
|||
|
|||
@ApiModelProperty("响应的ip地址(集群提供)") |
|||
@TableField("rsp_ip_adr") |
|||
private String rspIpAdr; |
|||
|
|||
@ApiModelProperty("成功标志") |
|||
@TableField("success_ind") |
|||
private Boolean successInd; |
|||
|
|||
@ApiModelProperty("请求报文头") |
|||
@TableField("req_header") |
|||
private String reqHeader; |
|||
|
|||
@ApiModelProperty("请求报文体") |
|||
@TableField("req_body") |
|||
private String reqBody; |
|||
|
|||
@ApiModelProperty("响应报文体") |
|||
@TableField("rsp_body") |
|||
private String rspBody; |
|||
|
|||
@ApiModelProperty("错误信息") |
|||
@TableField("error_msg") |
|||
private String errorMsg; |
|||
|
|||
@ApiModelProperty("总耗时") |
|||
@TableField("total_time") |
|||
private Long totalTime; |
|||
|
|||
@ApiModelProperty("创建时间") |
|||
@TableField(value = "create_time", fill = FieldFill.INSERT) |
|||
private LocalDate createTime; |
|||
|
|||
} |
@ -0,0 +1,7 @@ |
|||
package com.woniu.logger.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.woniu.logger.entity.LoggerInfoEntity; |
|||
|
|||
public interface LoggerInfoMapper extends BaseMapper<LoggerInfoEntity> { |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.woniu.logger.service; |
|||
|
|||
/** |
|||
* @className: ILoggerInfoService |
|||
* @author: woniu |
|||
* @date: 2023/8/24 |
|||
**/ |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.woniu.logger.entity.LoggerInfoEntity; |
|||
import org.springframework.scheduling.annotation.Async; |
|||
|
|||
/** |
|||
* 功能描述: 日志服务接口 <br/> |
|||
*/ |
|||
public interface ILoggerInfoService extends IService<LoggerInfoEntity> { |
|||
|
|||
/** |
|||
* 功能描述: 异步保存 <br/> |
|||
* |
|||
* @param info 日志信息 |
|||
*/ |
|||
@Async |
|||
default void saveAsync(LoggerInfoEntity info) { |
|||
save(info); |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,12 @@ |
|||
package com.woniu.logger.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import com.woniu.logger.entity.LoggerInfoEntity; |
|||
import com.woniu.logger.mapper.LoggerInfoMapper; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service |
|||
public class LoggerInfoServiceImpl extends ServiceImpl<LoggerInfoMapper,LoggerInfoEntity> implements ILoggerInfoService{ |
|||
|
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.woniu.logger.sql; |
|||
|
|||
import com.woniu.logger.sql.impl.MySQLDdlSql; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Getter; |
|||
|
|||
/** |
|||
* 功能描述: SQL执行ddl语句工厂 <br/> |
|||
*/ |
|||
@Getter |
|||
@AllArgsConstructor |
|||
public enum DdlSqlFactory { |
|||
|
|||
MYSQL(new MySQLDdlSql()), |
|||
; |
|||
|
|||
private final IDdlSql ddl; |
|||
|
|||
} |
|||
|
@ -0,0 +1,29 @@ |
|||
package com.woniu.logger.sql; |
|||
|
|||
|
|||
/** |
|||
* 功能描述: 数据库语句 <br/> |
|||
*/ |
|||
public interface IDdlSql { |
|||
|
|||
/** |
|||
* 查询表是否存在 |
|||
*/ |
|||
String queryTable(String date); |
|||
|
|||
/** |
|||
* 建表语句 |
|||
*/ |
|||
String createTable(); |
|||
|
|||
/** |
|||
* 备份表 |
|||
*/ |
|||
String backTable(String date); |
|||
|
|||
/** |
|||
* 删除表 |
|||
*/ |
|||
String dropTable(); |
|||
|
|||
} |
@ -0,0 +1,46 @@ |
|||
package com.woniu.logger.sql.impl; |
|||
|
|||
|
|||
import cn.hutool.core.util.StrUtil; |
|||
import com.woniu.logger.entity.LoggerInfoEntity; |
|||
import com.woniu.logger.sql.IDdlSql; |
|||
|
|||
public class MySQLDdlSql implements IDdlSql { |
|||
|
|||
@Override |
|||
public String queryTable(String date) { |
|||
return "select count(1) from information_schema.tables where table_name ='" + LoggerInfoEntity.TABLE_NAME + (StrUtil.isNotBlank(date) ? "_" + date : "") + "';"; |
|||
} |
|||
|
|||
@Override |
|||
public String createTable() { |
|||
return "create table " + LoggerInfoEntity.TABLE_NAME + "(" + |
|||
" `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',\n" + |
|||
" `url` varchar(500) COMMENT '访问的url',\n" + |
|||
" `class_name` varchar(500) COMMENT '类名',\n" + |
|||
" `method_name` varchar(100) COMMENT '方法名',\n" + |
|||
" `req_ip_adr` varchar(20) COMMENT '请求的ip地址',\n" + |
|||
" `rsp_ip_adr` varchar(20) COMMENT '响应的ip地址',\n" + |
|||
" `success_ind` tinyint COMMENT '成功标志',\n" + |
|||
" `req_header` text COMMENT '请求报文头',\n" + |
|||
" `req_body` text COMMENT '请求报文体',\n" + |
|||
" `rsp_body` text COMMENT '响应报文体',\n" + |
|||
" `error_msg` text COMMENT '错误信息',\n" + |
|||
" `total_time` Long COMMENT '总耗时',\n" + |
|||
" `create_time` datetime DEFAULT NULL COMMENT '创建时间',\n" + |
|||
" PRIMARY KEY (`id`) USING BTREE,\n" + |
|||
" KEY `idx_name` (`url`) USING BTREE\n" + |
|||
") ENGINE=InnoDB COMMENT='日志信息';"; |
|||
} |
|||
|
|||
@Override |
|||
public String backTable(String date) { |
|||
return "rename table " + LoggerInfoEntity.TABLE_NAME + " to " + LoggerInfoEntity.TABLE_NAME + "_" + date + ";"; |
|||
} |
|||
|
|||
@Override |
|||
public String dropTable() { |
|||
return "drop table " + LoggerInfoEntity.TABLE_NAME + ";"; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,88 @@ |
|||
package com.woniu.logger.util; |
|||
import org.springframework.web.context.request.RequestContextHolder; |
|||
import org.springframework.web.context.request.ServletRequestAttributes; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import java.net.InetAddress; |
|||
import java.net.UnknownHostException; |
|||
import java.util.Enumeration; |
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
|
|||
|
|||
|
|||
/** |
|||
* 功能描述: 请求工具类 <br/> |
|||
*/ |
|||
public class HttpRequestUtil { |
|||
|
|||
private static final String UNKNOWN = "unknown"; |
|||
private static final String LOCALHOST_IP = "127.0.0.1"; |
|||
// 客户端与服务器同为一台机器,获取的 ip 有时候是 ipv6 格式
|
|||
private static final String LOCALHOST_IPV6 = "0:0:0:0:0:0:0:1"; |
|||
private static final String SEPARATOR = ","; |
|||
|
|||
public static HttpServletRequest getHttpServletRequest() { |
|||
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); |
|||
if (servletRequestAttributes == null) { |
|||
return null; |
|||
} |
|||
return servletRequestAttributes.getRequest(); |
|||
} |
|||
|
|||
public static Map<String, String> getHeader() { |
|||
HttpServletRequest request = getHttpServletRequest(); |
|||
if (request == null) { |
|||
return new HashMap<>(); |
|||
} |
|||
Map<String, String> headerMap = new HashMap<>(); |
|||
Enumeration<String> headerNames = request.getHeaderNames(); |
|||
while (headerNames.hasMoreElements()) { |
|||
String headerName = headerNames.nextElement(); |
|||
headerMap.put(headerName, request.getHeader(headerName)); |
|||
} |
|||
return headerMap; |
|||
} |
|||
|
|||
public static String getRealIpAddress() { |
|||
HttpServletRequest request = getHttpServletRequest(); |
|||
if (request == null) { |
|||
return ""; |
|||
} |
|||
String ip = request.getHeader("x-forwarded-for"); |
|||
if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { |
|||
ip = request.getHeader("Proxy-Client-IP"); |
|||
} |
|||
if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { |
|||
ip = request.getHeader("X-Forwarded-For"); |
|||
} |
|||
if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { |
|||
ip = request.getHeader("WL-Proxy-Client-IP"); |
|||
} |
|||
if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { |
|||
ip = request.getHeader("X-Real-IP"); |
|||
} |
|||
if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { |
|||
ip = request.getRemoteAddr(); |
|||
if (LOCALHOST_IP.equalsIgnoreCase(ip) || LOCALHOST_IPV6.equalsIgnoreCase(ip)) { |
|||
// 根据网卡取本机配置的 IP
|
|||
InetAddress iNet = null; |
|||
try { |
|||
iNet = InetAddress.getLocalHost(); |
|||
} catch (UnknownHostException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
if (iNet != null) |
|||
ip = iNet.getHostAddress(); |
|||
} |
|||
} |
|||
// 对于通过多个代理的情况,分割出第一个 IP
|
|||
if (ip != null && ip.length() > 15) { |
|||
if (ip.indexOf(SEPARATOR) > 0) { |
|||
ip = ip.substring(0, ip.indexOf(SEPARATOR)); |
|||
} |
|||
} |
|||
return LOCALHOST_IPV6.equals(ip) ? LOCALHOST_IP : ip; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,57 @@ |
|||
# |
|||
spring.application.name=www |
|||
server.port=8081 |
|||
##1800s |
|||
#server.servlet.session.timeout=1800 |
|||
#spring.jackson.time-zone=GMT+8 |
|||
#spring.jackson.date-format=yyyy-MM-dd HH:mm:ss |
|||
# |
|||
##定义数据源 |
|||
#spring.shardingsphere.datasource.names=m1,m2 |
|||
# |
|||
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/test?serverTimezone=GMT%2b8&useUnicode=true&characterEncoding=utf8 |
|||
spring.datasource.username=root |
|||
spring.datasource.password=123456 |
|||
spring.datasource.driver‐class‐name=com.mysql.cj.jdbc.Driver |
|||
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource |
|||
|
|||
|
|||
#spring.redis.host=192.168.56.10 |
|||
#spring.redis.port=6379 |
|||
#spring.redis.password=123456 |
|||
# |
|||
# |
|||
#spring.shardingsphere.datasource.m2.url=jdbc:mysql://127.0.0.1:3306/test2?serverTimezone=GMT%2b8&useUnicode=true&characterEncoding=utf8 |
|||
#spring.shardingsphere.datasource.m2.username=root |
|||
#spring.shardingsphere.datasource.m2.password=123456 |
|||
#spring.shardingsphere.datasource.m2.driver‐class‐name=com.mysql.cj.jdbc.Driver |
|||
#spring.shardingsphere.datasource.m2.type=com.alibaba.druid.pool.DruidDataSource |
|||
# |
|||
## 指定t_user表的数据分布情况,配置数据节点 |
|||
#spring.shardingsphere.sharding.tables.t_user.actual‐data‐nodes=m$->{1..2}.t_user_$->{1..2} |
|||
# |
|||
## 指定t_user表的主键生成策略为SNOWFLAKE |
|||
#spring.shardingsphere.sharding.tables.t_user.key‐generator.column=id |
|||
#spring.shardingsphere.sharding.tables.t_user.key‐generator.type=SNOWFLAKE |
|||
# |
|||
## 指定t_user表的分库策略,分库策略包括分片键和分片算法 |
|||
#spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.sharding‐column=sex |
|||
#spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.algorithm‐expression=m$->{sex % 2 + 1} |
|||
# |
|||
# |
|||
## 指定t_user表的分表策略,分表策略包括分片键和分片算法 |
|||
#spring.shardingsphere.sharding.tables.t_user.table‐strategy.inline.sharding‐column=id |
|||
#spring.shardingsphere.sharding.tables.t_user.table‐strategy.inline.algorithm‐expression=t_user_$->{id % 2 + 1} |
|||
# |
|||
# |
|||
## 控制台日志配置 |
|||
#logging.level.root=info |
|||
# |
|||
## 打开sql输出日志 |
|||
#spring.shardingsphere.props.sql.show=true |
|||
# |
|||
##mapper文件扫描路径 |
|||
#mybatis.mapper-locations=classpath:/mapper/*.xml |
|||
# |
|||
# |
|||
# |
@ -0,0 +1,18 @@ |
|||
#spring: |
|||
# datasource: |
|||
# type: com.alibaba.druid.pool.DruidDataSource |
|||
# driverClassName: com.mysql.cj.jdbc.Driver |
|||
# # 主库数据源 |
|||
# master: |
|||
# url: jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
|||
# username: root |
|||
# password: 123456 |
|||
# slave: |
|||
# url: jdbc:mysql://localhost:3306/test2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
|||
# username: root |
|||
# password: 123456 |
|||
|
|||
# 日志打印级别:不打印-NONE;打印正常-PRINT;打印异常-ERROR;全部打印-ALL |
|||
logger: |
|||
project: |
|||
level: PRINT |
Binary file not shown.
@ -0,0 +1,26 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<configuration> |
|||
<!-- 控制台日志格式 --> |
|||
<property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %X{requestId} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/> |
|||
<!-- 控制台日志格式 依赖的渲染类 --> |
|||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> |
|||
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> |
|||
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> |
|||
<!-- 输出到控制台 --> |
|||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
|||
<encoder> |
|||
<!-- 配置日志输出格式 --> |
|||
<pattern>${CONSOLE_LOG_PATTERN}</pattern> |
|||
<!-- 使用的字符集 --> |
|||
<charset>UTF-8</charset> |
|||
</encoder> |
|||
</appender> |
|||
|
|||
|
|||
<!-- 开启上面的appender --> |
|||
<root level="info"> |
|||
<appender-ref ref="CONSOLE" /> |
|||
</root> |
|||
|
|||
|
|||
</configuration> |
@ -0,0 +1,24 @@ |
|||
<?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.woniu.dao.master.MasterUserDao"> |
|||
|
|||
|
|||
|
|||
<insert id="insertUser" > |
|||
insert into t_user_1(id,name, sex) values (#{id},#{name}, #{sex}) |
|||
</insert> |
|||
|
|||
<select id="countUser" resultType="long"> |
|||
select count(*) |
|||
from |
|||
t_user_1 |
|||
where |
|||
id in |
|||
<foreach collection="ids" item="item" index="index" open="(" close=")" separator=","> |
|||
#{item} |
|||
</foreach> |
|||
</select> |
|||
|
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,9 @@ |
|||
<?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.woniu.dao.slave.SlaveUserDao"> |
|||
|
|||
<insert id="insertUser"> |
|||
insert into t_user_1(id,name, sex) values (#{id},#{name}, #{sex}) |
|||
</insert> |
|||
|
|||
</mapper> |
@ -0,0 +1,35 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE configuration |
|||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-config.dtd"> |
|||
<configuration> |
|||
<settings> |
|||
<!-- 打印sql日志 --> |
|||
<setting name="logImpl" value="org.apache.ibatis.logging.stdout.StdOutImpl"/> |
|||
</settings> |
|||
<plugins> |
|||
<plugin interceptor="com.github.pagehelper.PageHelper"> |
|||
<property name="dialect" value="mysql"/> |
|||
<property name="offsetAsPageNum" value="false"/> |
|||
<property name="rowBoundsWithCount" value="false"/> |
|||
<property name="pageSizeZero" value="true"/> |
|||
<property name="reasonable" value="false"/> |
|||
<property name="supportMethodsArguments" value="false"/> |
|||
<property name="returnPageInfo" value="none"/> |
|||
</plugin> |
|||
</plugins> |
|||
<!--<environments default="development">--> |
|||
<!--<environment id="development">--> |
|||
<!--<transactionManager type="JDBC"/>--> |
|||
<!--<dataSource type="POOLED">--> |
|||
<!--<property name="driver" value="com.mysql.jdbc.Driver"/>--> |
|||
<!--<property name="url" value="jdbc:mysql://localhost:3307/happy_home?serverTimezone=UTC"/>--> |
|||
<!--<property name="username" value="root"/>--> |
|||
<!--<property name="password" value="root"/>--> |
|||
<!--</dataSource>--> |
|||
<!--</environment>--> |
|||
<!--</environments>--> |
|||
<!--<mappers>--> |
|||
<!--<mapper resource="mapper/EmployeeMapper.xml" />--> |
|||
<!--</mappers>--> |
|||
</configuration> |
@ -0,0 +1,189 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> |
|||
<component name="FacetManager"> |
|||
<facet type="Spring" name="Spring"> |
|||
<configuration /> |
|||
</facet> |
|||
<facet type="web" name="Web"> |
|||
<configuration> |
|||
<webroots /> |
|||
<sourceRoots> |
|||
<root url="file://$MODULE_DIR$/src/main/java" /> |
|||
<root url="file://$MODULE_DIR$/src/main/resources" /> |
|||
</sourceRoots> |
|||
</configuration> |
|||
</facet> |
|||
</component> |
|||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8"> |
|||
<output url="file://$MODULE_DIR$/target/classes" /> |
|||
<output-test url="file://$MODULE_DIR$/target/test-classes" /> |
|||
<content url="file://$MODULE_DIR$"> |
|||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> |
|||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> |
|||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> |
|||
<excludeFolder url="file://$MODULE_DIR$/target" /> |
|||
</content> |
|||
<orderEntry type="inheritedJdk" /> |
|||
<orderEntry type="sourceFolder" forTests="false" /> |
|||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.5.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.5.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.5.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.5.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.5.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.4" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.10" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.7" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.3.72" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.72" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.jetbrains:annotations:13.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.3.9.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.3.9.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.5" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.13.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.github.rholder:guava-retrying:2.0.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:2.0.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.google.guava:guava:29.0-jre" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.checkerframework:checker-qual:2.11.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.lionsoul:ip2region:2.7.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.3.9.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.13.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.13.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.6" level="project" /> |
|||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.3.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.3.9.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.3.9.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.13.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.3.9.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.13.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.13.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" /> |
|||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.13.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.13.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.26" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.3.9.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.3.9.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.11.4" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.4" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.4" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.4" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.11.4" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.3.9.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.43" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.43" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.13.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.13.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.13.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-test:2.3.9.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-test:2.3.9.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.3.9.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: net.minidev:json-smart:2.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: net.minidev:accessors-smart:1.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.assertj:assertj-core:3.16.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest:2.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.junit.jupiter:junit-jupiter:5.6.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.junit.platform:junit-platform-commons:1.6.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.junit.jupiter:junit-jupiter-params:5.6.3" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.6.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.junit.vintage:junit-vintage-engine:5.6.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.junit.platform:junit-platform-engine:1.6.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: junit:junit:4.13.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.mockito:mockito-core:3.3.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.20" level="project" /> |
|||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.20" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.objenesis:objenesis:2.6" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.mockito:mockito-junit-jupiter:3.3.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-test:5.2.13.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.xmlunit:xmlunit-core:2.7.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.18" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.3.9.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.13.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.11.4" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.9.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.2.18" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.2.18" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-runtime:2.3.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.jaxb:txw2:2.3.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:3.0.11" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.activation:jakarta.activation:1.2.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.29" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alipay.sofa:runtime-sofa-boot-starter:3.18.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alipay.sofa:runtime-sofa-boot:3.18.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alipay.sofa:sofa-boot:3.18.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alipay.sofa:log-sofa-boot-starter:3.18.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alipay.sofa:log-sofa-boot:3.18.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alipay.sofa.common:sofa-common-tools:1.3.6" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alipay.sofa:sofa-ark-spi:1.1.5" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alipay.sofa:sofa-ark-exception:1.1.5" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alipay.sofa:sofa-boot-autoconfigure:3.18.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.3.9.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish:jakarta.el:3.0.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.1.7.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.3.9.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.3.7.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.3.7.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.3.7.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.13.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.2.13.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.3.6.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.59.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.59.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.59.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.59.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.59.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.59.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.14.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.github.ben-manes.caffeine:caffeine:2.9.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.76" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alibaba:easyexcel:3.0.5" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.poi:poi:4.1.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.14" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.zaxxer:SparseBitSet:1.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.1.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.19" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.06" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.1.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.1.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.commons:commons-csv:1.8" level="project" /> |
|||
<orderEntry type="library" name="Maven: cglib:cglib:3.3.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.ow2.asm:asm:7.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.ehcache:ehcache:3.8.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.testng:testng:7.8.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.beust:jcommander:1.82" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.webjars:jquery:3.6.1" level="project" /> |
|||
</component> |
|||
</module> |
Loading…
Reference in new issue