Browse Source

!700 newInstance() 已弃用,使用clazz.getDeclaredConstructor().newInstance()
Merge pull request !700 from Nymph2333/N/A

若依 2 years ago
parent
commit
f7595e4998

+ 1 - 1
ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java

@@ -34,7 +34,7 @@ public class JobInvokeUtil
         }
         }
         else
         else
         {
         {
-            Object bean = Class.forName(beanName).newInstance();
+            Object bean = Class.forName(beanName).getDeclaredConstructor().newInstance();
             invokeMethod(bean, methodName, methodParams);
             invokeMethod(bean, methodName, methodParams);
         }
         }
     }
     }