code: public <T> T create(Class<T> daoClass) {
      if (daoClass == null) {
        throw new NullPointerException("dao interface can't be null");
      }
  
      if (!daoClass.isInterface()) {
        throw new IllegalArgumentException("expected an interface to proxy, but " + daoClass);
      }
  
      DB dbAnno = daoClass.getAnnotation(DB.class);
      if (dbAnno == null) {
        throw new IllegalStateException("dao interface expected one @DB " +
            "annotation but not found");
      }
  
      Cache cacheAnno = daoClass.getAnnotation(Cache.class);
      if (cacheAnno != null && cacheHandler == null) {
        throw new IllegalStateException("if @Cache annotation on dao interface, " +
            "cacheHandler can't be null");
      }
  
      if (dataSourceFactoryGroup == null) {
        throw new IllegalArgumentException("please set dataSource or dataSourceFactory or dataSourceFactories");
      }
  
      MangoInvocationHandler handler = new MangoInvocationHandler(
          daoClass, dataSourceFactoryGroup, cacheHandler, interceptorChain, statCollector, this);
      if (!isLazyInit) { // 不使用懒加载，则提前加载
        List<Method> methods = Methods.listMethods(daoClass);
        for (Method method : methods) {
          try {
            handler.getOperator(method);
          } catch (Throwable e) {
            throw new InitializationException("initialize " + ToStringHelper.toString(method) + " error", e);
          }
        }
      }
      return Reflection.newProxy(daoClass, handler);
    }
docs: 创建代理DAO类