jyy
2021-06-12 393d296e43f0e5f11e524cab5446bcd3eee94e89
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");
   }
}