Package com.bastengao.struts2.freeroute

Examples of com.bastengao.struts2.freeroute.ControllerPackageProvider


    private static int weightOfMethod(HttpServletRequest request, RouteMapping routeMapping) {
        if (routeMapping.getHttpMethods().size() == 0) {
            return 1000;
        }

        MethodType methodType = RouteUtil.valueOfMethod(request.getMethod());
        if (methodType == null) {
            return -1;
        }

        for (MethodType m : routeMapping.getHttpMethods()) {
View Full Code Here


    static int weightOfMethod(HttpServletRequest request, RouteMapping routeMapping) {
        if (routeMapping.getHttpMethods().size() == 0) {
            return 1000;
        }

        MethodType methodType = RouteUtil.valueOfMethod(request.getMethod());
        if (methodType == null) {
            return -1;
        }

        for (MethodType m : routeMapping.getHttpMethods()) {
View Full Code Here

        if (methods == null) {
            return routes;
        }

        ContentBase contentBase = ReflectUtil.getAnnotation(controller, ContentBase.class);
        Route controllerRoute = ReflectUtil.getAnnotation(controller, Route.class);
        for (Method method : methods) {
            //查看是否有 @Route 注解, 如果有则加到路由列表中
            if (method.isAnnotationPresent(Route.class)) {
                Route methodRoute = method.getAnnotation(Route.class);
                RouteMapping routeMapping = new RouteMapping(contentBase, controllerRoute, methodRoute, controller, method);
                routes.add(routeMapping);

                if (log.isTraceEnabled()) {
                    log.trace("route: {}", routeMapping.prettyPath());
View Full Code Here

        if (methods == null) {
            return routes;
        }

        ContentBase contentBase = ReflectUtil.getAnnotation(controller, ContentBase.class);
        Route controllerRoute = ReflectUtil.getAnnotation(controller, Route.class);
        for (Method method : methods) {
            //查看是否有 @Route 注解, 如果有则加到路由列表中
            if (method.isAnnotationPresent(Route.class)) {
                Route methodRoute = method.getAnnotation(Route.class);
                RouteMapping routeMapping = new RouteMapping(contentBase, controllerRoute, methodRoute, controller, method);
                routes.add(routeMapping);

                if (log.isTraceEnabled()) {
                    log.trace("route: {}", routeMapping.prettyPath());
View Full Code Here

        if (methods == null) {
            return routes;
        }

        ContentBase contentBase = ReflectUtil.getAnnotation(controller, ContentBase.class);
        Route controllerRoute = ReflectUtil.getAnnotation(controller, Route.class);
        for (Method method : methods) {
            //查看是否有 @Route 注解, 如果有则加到路由列表中
            if (method.isAnnotationPresent(Route.class)) {
                Route methodRoute = method.getAnnotation(Route.class);
                RouteMapping routeMapping = new RouteMapping(contentBase, controllerRoute, methodRoute, controller, method);
                routes.add(routeMapping);

                if (log.isTraceEnabled()) {
                    log.trace("route: {}", routeMapping.prettyPath());
View Full Code Here

        if (methods == null) {
            return routes;
        }

        ContentBase contentBase = ReflectUtil.getAnnotation(controller, ContentBase.class);
        Route controllerRoute = ReflectUtil.getAnnotation(controller, Route.class);
        for (Method method : methods) {
            //查看是否有 @Route 注解, 如果有则加到路由列表中
            if (method.isAnnotationPresent(Route.class)) {
                Route methodRoute = method.getAnnotation(Route.class);
                RouteMapping routeMapping = new RouteMapping(contentBase, controllerRoute, methodRoute, controller, method);
                routes.add(routeMapping);

                if (log.isTraceEnabled()) {
                    log.trace("route: {}", routeMapping.prettyPath());
View Full Code Here

TOP

Related Classes of com.bastengao.struts2.freeroute.ControllerPackageProvider

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.