935090232@qq.com
2021-01-26 ae2efe9a1b627fcfbe61020e9e0a82470a3959d7
zq-erp/src/main/java/com/matrix/core/tools/rr/GlueFactory.java
@@ -104,4 +104,27 @@
      throw new IllegalArgumentException(">>>>>>>>>>> xxl-glue, loadNewInstance error, instance is null");
   }
   /**
    * 根据字符串获取几个java实例
    * @param codeSource
    * @return
    * @throws Exception
    */
   public Object loadInstance(String codeSource) throws Exception{
      if (codeSource!=null && codeSource.trim().length()>0) {
         Class<?> clazz = groovyClassLoader.parseClass(codeSource);
         if (clazz != null) {
            Object instance = clazz.newInstance();
            if (instance!=null) {
               this.injectService(instance);
               return  instance;
            }
         }
      }
      throw new IllegalArgumentException(">>>>>>>>>>> xxl-glue, loadNewInstance error, instance is null");
   }
}