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-admin/pom.xml | 22 +++++----------------- 1 files changed, 5 insertions(+), 17 deletions(-) diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index 6b0a0fa..9a4cde8 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -5,7 +5,7 @@ <parent> <artifactId>ruoyi</artifactId> <groupId>com.ruoyi</groupId> - <version>3.4.0</version> + <version>3.8.5</version> </parent> <modelVersion>4.0.0</modelVersion> <packaging>jar</packaging> @@ -24,29 +24,17 @@ <optional>true</optional> <!-- 表示依赖不会传递 --> </dependency> - <!-- swagger2--> + <!-- swagger3--> <dependency> <groupId>io.springfox</groupId> - <artifactId>springfox-swagger2</artifactId> + <artifactId>springfox-boot-starter</artifactId> </dependency> - <!--防止进入swagger页面报类型转换错误,排除2.9.2中的引用,手动增加1.5.21版本--> - <dependency> - <groupId>io.swagger</groupId> - <artifactId>swagger-annotations</artifactId> - <version>1.5.21</version> - </dependency> - + <!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 --> <dependency> <groupId>io.swagger</groupId> <artifactId>swagger-models</artifactId> - <version>1.5.21</version> - </dependency> - - <!-- swagger2-UI--> - <dependency> - <groupId>io.springfox</groupId> - <artifactId>springfox-swagger-ui</artifactId> + <version>1.6.2</version> </dependency> <!-- Mysql驱动包 --> -- Gitblit v1.9.2