feat: 升级部分依赖于优化代码(升级fastjson2,不再兼容fastjson1),其他升级看详情

升级 hutool:5.8.35
升级 oshi-core:6.6.5
升级 mica-ip2region:2.7.18.9
升级 poi:5.4.0
升级 commons-text:1.13.0
pull/875/head
Jie Zheng 2025-01-22 10:17:28 +08:00
parent f9799cdfb3
commit 4e4ca20828
22 changed files with 104 additions and 100 deletions

View File

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <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">
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> <parent>
<artifactId>eladmin</artifactId> <artifactId>eladmin</artifactId>
<groupId>me.zhengjie</groupId> <groupId>me.zhengjie</groupId>
@ -9,7 +7,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<properties> <properties>
<hutool.version>5.8.21</hutool.version> <hutool.version>5.8.35</hutool.version>
</properties> </properties>
<artifactId>eladmin-common</artifactId> <artifactId>eladmin-common</artifactId>

View File

@ -15,9 +15,9 @@
*/ */
package me.zhengjie.config; package me.zhengjie.config;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson.parser.ParserConfig; import com.alibaba.fastjson2.JSONFactory;
import com.alibaba.fastjson.serializer.SerializerFeature; import com.alibaba.fastjson2.JSONWriter;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.cache.Cache; import org.springframework.cache.Cache;
@ -33,8 +33,8 @@ import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.RedisSerializationContext; import org.springframework.data.redis.serializer.RedisSerializationContext;
import org.springframework.data.redis.serializer.RedisSerializer; import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.SerializationException;
import org.springframework.data.redis.serializer.StringRedisSerializer; import org.springframework.data.redis.serializer.StringRedisSerializer;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.time.Duration; import java.time.Duration;
import java.util.HashMap; import java.util.HashMap;
@ -65,25 +65,13 @@ public class RedisConfiguration {
@Bean(name = "redisTemplate") @Bean(name = "redisTemplate")
public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) { public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) {
RedisTemplate<Object, Object> template = new RedisTemplate<>(); RedisTemplate<Object, Object> template = new RedisTemplate<>();
//序列化 // 指定 key 和 value 的序列化方案
FastJsonRedisSerializer<Object> fastJsonRedisSerializer = new FastJsonRedisSerializer<>(Object.class); FastJsonRedisSerializer<Object> fastJsonRedisSerializer = new FastJsonRedisSerializer<>(Object.class);
// value值的序列化采用fastJsonRedisSerializer // value值的序列化采用fastJsonRedisSerializer
template.setValueSerializer(fastJsonRedisSerializer); template.setValueSerializer(fastJsonRedisSerializer);
template.setHashValueSerializer(fastJsonRedisSerializer); template.setHashValueSerializer(fastJsonRedisSerializer);
// fastjson 升级到 1.2.83 后需要指定序列化白名单 // 设置fastJson的序列化白名单
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.domain"); JSONFactory.getDefaultObjectReaderProvider().addAutoTypeAccept("me.zhengjie");
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.service.dto");
// 模块内的实体类
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.mnt.domain");
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.quartz.domain");
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.system.domain");
// 模块内的 Dto
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.mnt.service.dto");
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.quartz.service.dto");
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.security.service.dto");
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.system.service.dto");
// 分页返回数据
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.utils.PageResult");
// key的序列化采用StringRedisSerializer // key的序列化采用StringRedisSerializer
template.setKeySerializer(new StringRedisSerializer()); template.setKeySerializer(new StringRedisSerializer());
template.setHashKeySerializer(new StringRedisSerializer()); template.setHashKeySerializer(new StringRedisSerializer());
@ -92,7 +80,7 @@ public class RedisConfiguration {
} }
/** /**
* 使 *
* @param redisConnectionFactory / * @param redisConnectionFactory /
* @return * @return
*/ */
@ -132,7 +120,7 @@ public class RedisConfiguration {
} }
@Bean @Bean
@SuppressWarnings("all") @SuppressWarnings({"unchecked","all"})
public CacheErrorHandler errorHandler() { public CacheErrorHandler errorHandler() {
return new SimpleCacheErrorHandler() { return new SimpleCacheErrorHandler() {
@Override @Override
@ -174,15 +162,17 @@ public class RedisConfiguration {
} }
@Override @Override
public byte[] serialize(T t) { public byte[] serialize(T t) throws SerializationException
{
if (t == null) { if (t == null) {
return new byte[0]; return new byte[0];
} }
return JSON.toJSONString(t, SerializerFeature.WriteClassName).getBytes(StandardCharsets.UTF_8); return JSON.toJSONString(t, JSONWriter.Feature.WriteClassName).getBytes(StandardCharsets.UTF_8);
} }
@Override @Override
public T deserialize(byte[] bytes) { public T deserialize(byte[] bytes) throws SerializationException
{
if (bytes == null || bytes.length == 0) { if (bytes == null || bytes.length == 0) {
return null; return null;
} }

View File

@ -21,7 +21,7 @@ import java.io.IOException;
* @date 2025-01-11 * @date 2025-01-11
**/ **/
@Configuration @Configuration
@SuppressWarnings("all") @SuppressWarnings({"unchecked","all"})
@ConditionalOnWebApplication @ConditionalOnWebApplication
@AutoConfigureAfter(DruidDataSourceAutoConfigure.class) @AutoConfigureAfter(DruidDataSourceAutoConfigure.class)
@ConditionalOnProperty(name = "spring.datasource.druid.stat-view-servlet.enabled", @ConditionalOnProperty(name = "spring.datasource.druid.stat-view-servlet.enabled",

View File

@ -15,9 +15,9 @@
*/ */
package me.zhengjie.config.webConfig; package me.zhengjie.config.webConfig;
import com.alibaba.fastjson.serializer.SerializerFeature; import com.alibaba.fastjson2.JSONWriter;
import com.alibaba.fastjson.support.config.FastJsonConfig; import com.alibaba.fastjson2.support.config.FastJsonConfig;
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter; import com.alibaba.fastjson2.support.spring.http.converter.FastJsonHttpMessageConverter;
import me.zhengjie.config.properties.FileProperties; import me.zhengjie.config.properties.FileProperties;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@ -74,13 +74,14 @@ public class ConfigurerAdapter implements WebMvcConfigurer {
@Override @Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) { public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
// 使用 fastjson 序列化,会导致 @JsonIgnore 失效,可以使用 @JSONField(serialize = false) 替换 // 配置 FastJsonHttpMessageConverter
FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter(); FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter();
List<MediaType> supportMediaTypeList = new ArrayList<>(); List<MediaType> supportMediaTypeList = new ArrayList<>();
supportMediaTypeList.add(MediaType.APPLICATION_JSON); supportMediaTypeList.add(MediaType.APPLICATION_JSON);
FastJsonConfig config = new FastJsonConfig(); FastJsonConfig config = new FastJsonConfig();
config.setDateFormat("yyyy-MM-dd HH:mm:ss"); config.setDateFormat("yyyy-MM-dd HH:mm:ss");
config.setSerializerFeatures(SerializerFeature.DisableCircularReferenceDetect); // 开启引用检测
config.setWriterFeatures(JSONWriter.Feature.ReferenceDetection);
converter.setFastJsonConfig(config); converter.setFastJsonConfig(config);
converter.setSupportedMediaTypes(supportMediaTypeList); converter.setSupportedMediaTypes(supportMediaTypeList);
converter.setDefaultCharset(StandardCharsets.UTF_8); converter.setDefaultCharset(StandardCharsets.UTF_8);

View File

@ -67,7 +67,7 @@ public class SwaggerConfig {
private final ApplicationContext applicationContext; private final ApplicationContext applicationContext;
@Bean @Bean
@SuppressWarnings("all") @SuppressWarnings({"unchecked","all"})
public Docket createRestApi() { public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2) return new Docket(DocumentationType.SWAGGER_2)
.enable(enabled) .enable(enabled)

View File

@ -18,9 +18,9 @@ package me.zhengjie.utils;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.jwt.JWT; import cn.hutool.jwt.JWT;
import cn.hutool.jwt.JWTUtil; import cn.hutool.jwt.JWTUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson2.JSONObject;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import me.zhengjie.utils.enums.DataScopeEnum; import me.zhengjie.utils.enums.DataScopeEnum;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;

View File

@ -31,7 +31,7 @@ import java.util.List;
* @date 2019-01-07 * @date 2019-01-07
*/ */
@Slf4j @Slf4j
@SuppressWarnings("all") @SuppressWarnings({"unchecked","all"})
public class SpringBeanHolder implements ApplicationContextAware, DisposableBean { public class SpringBeanHolder implements ApplicationContextAware, DisposableBean {
private static ApplicationContext applicationContext = null; private static ApplicationContext applicationContext = null;

View File

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <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">
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> <parent>
<artifactId>eladmin</artifactId> <artifactId>eladmin</artifactId>
<groupId>me.zhengjie</groupId> <groupId>me.zhengjie</groupId>

View File

@ -24,8 +24,8 @@ import java.math.BigDecimal;
</#if> </#if>
import java.io.Serializable; import java.io.Serializable;
<#if !auto && pkColumnType = 'Long'> <#if !auto && pkColumnType = 'Long'>
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer; import com.alibaba.fastjson2.serializer.ToStringSerializer;
</#if> </#if>
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;

View File

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <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">
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> <parent>
<artifactId>eladmin</artifactId> <artifactId>eladmin</artifactId>
<groupId>me.zhengjie</groupId> <groupId>me.zhengjie</groupId>

View File

@ -17,8 +17,8 @@ package me.zhengjie.service.impl;
import cn.hutool.core.lang.Dict; import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson2.JSONObject;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import me.zhengjie.domain.SysLog; import me.zhengjie.domain.SysLog;
import me.zhengjie.repository.LogRepository; import me.zhengjie.repository.LogRepository;

View File

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <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">
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> <parent>
<artifactId>eladmin</artifactId> <artifactId>eladmin</artifactId>
<groupId>me.zhengjie</groupId> <groupId>me.zhengjie</groupId>
@ -63,22 +61,22 @@
</dependency> </dependency>
<!-- linux的管理 --> <!-- linux的管理 -->
<dependency> <dependency>
<groupId>ch.ethz.ganymed</groupId> <groupId>ch.ethz.ganymed</groupId>
<artifactId>ganymed-ssh2</artifactId> <artifactId>ganymed-ssh2</artifactId>
<version>build210</version> <version>build210</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.jcraft</groupId> <groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId> <artifactId>jsch</artifactId>
<version>0.1.55</version> <version>0.1.55</version>
</dependency> </dependency>
<!-- 获取系统信息 --> <!-- 获取系统信息 -->
<dependency> <dependency>
<groupId>com.github.oshi</groupId> <groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId> <artifactId>oshi-core</artifactId>
<version>6.1.4</version> <version>6.6.5</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -15,7 +15,7 @@
*/ */
package me.zhengjie.modules.maint.websocket; package me.zhengjie.modules.maint.websocket;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson2.JSON;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.websocket.*; import javax.websocket.*;

View File

@ -45,7 +45,7 @@ public class QuartzRunnable implements Callable<Object> {
} }
@Override @Override
@SuppressWarnings("all") @SuppressWarnings({"unchecked","all"})
public Object call() throws Exception { public Object call() throws Exception {
ReflectionUtils.makeAccessible(method); ReflectionUtils.makeAccessible(method);
if (StringUtils.isNotBlank(params)) { if (StringUtils.isNotBlank(params)) {

View File

@ -15,7 +15,7 @@
*/ */
package me.zhengjie.modules.security.service.dto; package me.zhengjie.modules.security.service.dto;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson2.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;

View File

@ -15,7 +15,7 @@
*/ */
package me.zhengjie.modules.system.domain; package me.zhengjie.modules.system.domain;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson2.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;

View File

@ -15,12 +15,11 @@
*/ */
package me.zhengjie.modules.system.domain; package me.zhengjie.modules.system.domain;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson2.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import me.zhengjie.base.BaseEntity; import me.zhengjie.base.BaseEntity;
import javax.persistence.*; import javax.persistence.*;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;

View File

@ -15,7 +15,7 @@
*/ */
package me.zhengjie.modules.system.domain; package me.zhengjie.modules.system.domain;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson2.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;

View File

@ -15,7 +15,7 @@
*/ */
package me.zhengjie.modules.system.service.dto; package me.zhengjie.modules.system.service.dto;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson2.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;

View File

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <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">
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> <parent>
<artifactId>eladmin</artifactId> <artifactId>eladmin</artifactId>
<groupId>me.zhengjie</groupId> <groupId>me.zhengjie</groupId>

View File

@ -15,7 +15,7 @@
*/ */
package me.zhengjie.service.impl; package me.zhengjie.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson2.JSON;
import com.qiniu.common.QiniuException; import com.qiniu.common.QiniuException;
import com.qiniu.http.Response; import com.qiniu.http.Response;
import com.qiniu.storage.BucketManager; import com.qiniu.storage.BucketManager;

74
pom.xml
View File

@ -25,13 +25,11 @@
</parent> </parent>
<properties> <properties>
<log4j2.version>2.17.0</log4j2.version>
<logback.version>1.2.9</logback.version> <logback.version>1.2.9</logback.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<swagger.version>2.9.2</swagger.version> <fastjson2.version>2.0.54</fastjson2.version>
<fastjson.version>1.2.83</fastjson.version>
<druid.version>1.2.19</druid.version> <druid.version>1.2.19</druid.version>
<commons-pool2.version>2.11.1</commons-pool2.version> <commons-pool2.version>2.11.1</commons-pool2.version>
<mapstruct.version>1.4.2.Final</mapstruct.version> <mapstruct.version>1.4.2.Final</mapstruct.version>
@ -54,6 +52,13 @@
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<!-- 去掉Jackson依赖用fastjson -->
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-json</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<!--Spring boot 测试--> <!--Spring boot 测试-->
@ -108,11 +113,24 @@
</dependency> </dependency>
<!-- Swagger UI 相关 --> <!-- Swagger UI 相关 -->
<!-- https://mvnrepository.com/artifact/com.github.xiaoymin/knife4j-spring-boot-starter -->
<dependency> <dependency>
<groupId>com.github.xiaoymin</groupId> <groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId> <artifactId>knife4j-spring-boot-starter</artifactId>
<version>3.0.3</version> <version>3.0.3</version>
<exclusions>
<!-- 去掉 swagger-annotations 依赖,避免冲突 -->
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 添加swagger-annotations依赖 -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.22</version>
</dependency> </dependency>
@ -131,11 +149,11 @@
<version>${druid.version}</version> <version>${druid.version}</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/net.dreamlu/mica-ip2region --> <!-- IP地址解析库 -->
<dependency> <dependency>
<groupId>net.dreamlu</groupId> <groupId>net.dreamlu</groupId>
<artifactId>mica-ip2region</artifactId> <artifactId>mica-ip2region</artifactId>
<version>2.7.12</version> <version>2.7.18.9</version>
</dependency> </dependency>
<!--lombok插件--> <!--lombok插件-->
@ -149,12 +167,12 @@
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId> <artifactId>poi</artifactId>
<version>5.2.0</version> <version>5.4.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId> <artifactId>poi-ooxml</artifactId>
<version>5.2.0</version> <version>5.4.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>xerces</groupId> <groupId>xerces</groupId>
@ -162,11 +180,30 @@
<version>2.12.2</version> <version>2.12.2</version>
</dependency> </dependency>
<!-- fastjson --> <!-- fastjson2 -->
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson</artifactId> <artifactId>fastjson2</artifactId>
<version>${fastjson.version}</version> <version>${fastjson2.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2-extension-spring5</artifactId>
<version>${fastjson2.version}</version>
</dependency>
<!-- Java图形验证码 -->
<dependency>
<groupId>com.github.whvcse</groupId>
<artifactId>easy-captcha</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.13.0</version>
</dependency> </dependency>
<!--mapStruct依赖--> <!--mapStruct依赖-->
@ -186,19 +223,6 @@
<artifactId>javax.inject</artifactId> <artifactId>javax.inject</artifactId>
<version>1</version> <version>1</version>
</dependency> </dependency>
<!-- Java图形验证码 -->
<dependency>
<groupId>com.github.whvcse</groupId>
<artifactId>easy-captcha</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.10.0</version>
</dependency>
</dependencies> </dependencies>
<build> <build>