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());