Package com.jfinal.ext.route

Examples of com.jfinal.ext.route.ControllerBind


  @Override
  @SuppressWarnings({"rawtypes", "unchecked"})
  public void config() {
    List<Class<? extends Controller>> controllerClasses = ClassSearcher.of(Controller.class)
        .includeAllJarsInLib(includeAllJarsInLib).injars(includeJars).search();
    ControllerBind controllerBind = null;
    for (Class controller : controllerClasses) {
      if (excludeClasses.contains(controller)) {
        continue;
      }
      controllerBind = (ControllerBind) controller.getAnnotation(ControllerBind.class);
      if (controllerBind == null) {
        if (!autoScan) {
          continue;
        }
        this.add(controllerKey(controller), controller);
        logger.debug("routes.add(" + controllerKey(controller) + ", " + controller.getName() + ")");
      } else if (StrKit.isBlank(controllerBind.viewPath())) {
        this.add(controllerBind.controllerKey(), controller);
        logger.debug("routes.add(" + controllerBind.controllerKey() + ", " + controller.getName() + ")");
      } else {
        this.add(controllerBind.controllerKey(), controller, controllerBind.viewPath());
        logger.debug("routes.add(" + controllerBind.controllerKey() + ", " + controller + ","
            + controllerBind.viewPath() + ")");
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.jfinal.ext.route.ControllerBind

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.