xiaoyong931011
2021-03-10 3d00fa32affba29c7862dca8fc60b32ba1ee74c4
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");
   }
}