报错:
This inspection reports where deprecated code is used in the specified inspection scope。
使用以下代码进行替代
class.getDeclaredConstructor().newInstance();
全部代码:
String beanPath = props.getProperty(beanName);
System.out.println("beanPath = " + beanPath);
bean=Class.forName(beanPath).getDeclaredConstructor().newInstance();
//bean = Class.forName(beanPath).newInstance(); illgeal