From af0e0a110e7187bf008655f7510199a0c0b25ec4 Mon Sep 17 00:00:00 2001 From: Nymph2333 <498092988@qq.com> Date: 星期一, 10 四月 2023 14:27:40 +0800 Subject: [PATCH] newInstance() 已弃用,使用clazz.getDeclaredConstructor().newInstance() This method propagates any exception thrown by the nullary constructor, including a checked exception. Use of this method effectively bypasses the compile-time exception checking that would otherwise be performed by the compiler. The Constructor.newInstance method avoids this problem by wrapping any exception thrown by the constructor in a (checked) InvocationTargetException. The call clazz.newInstance() can be replaced by clazz.getDeclaredConstructor().newInstance() The latter sequence of calls is inferred to be able to throw the additional exception types InvocationTargetException and NoSuchMethodException. Both of these exception types are subclasses of ReflectiveOperationException. --- ruoyi-common/pom.xml | 31 +++++++++++++++++++------------ 1 files changed, 19 insertions(+), 12 deletions(-) diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml index 653cfdb..a517e26 100644 --- a/ruoyi-common/pom.xml +++ b/ruoyi-common/pom.xml @@ -5,7 +5,7 @@ <parent> <artifactId>ruoyi</artifactId> <groupId>com.ruoyi</groupId> - <version>3.5.0</version> + <version>3.8.5</version> </parent> <modelVersion>4.0.0</modelVersion> @@ -43,8 +43,8 @@ <!-- 自定义验证注解 --> <dependency> - <groupId>javax.validation</groupId> - <artifactId>validation-api</artifactId> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-validation</artifactId> </dependency> <!--常用工具类 --> @@ -58,23 +58,24 @@ <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </dependency> + + <!-- 动态数据源 --> + <dependency> + <groupId>com.baomidou</groupId> + <artifactId>dynamic-datasource-spring-boot-starter</artifactId> + <version>3.5.2</version> + </dependency> <!-- 阿里JSON解析器 --> <dependency> - <groupId>com.alibaba</groupId> - <artifactId>fastjson</artifactId> + <groupId>com.alibaba.fastjson2</groupId> + <artifactId>fastjson2</artifactId> </dependency> <!-- io常用工具类 --> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> - </dependency> - - <!-- 文件上传工具类 --> - <dependency> - <groupId>commons-fileupload</groupId> - <artifactId>commons-fileupload</artifactId> </dependency> <!-- excel工具 --> @@ -89,12 +90,18 @@ <artifactId>snakeyaml</artifactId> </dependency> - <!--Token生成与解析--> + <!-- Token生成与解析--> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt</artifactId> </dependency> + <!-- Jaxb --> + <dependency> + <groupId>javax.xml.bind</groupId> + <artifactId>jaxb-api</artifactId> + </dependency> + <!-- redis 缓存操作 --> <dependency> <groupId>org.springframework.boot</groupId> -- Gitblit v1.9.2