use of justlive.earth.breeze.snow.common.web.vertx.annotation.VertxRoute in project earth-snow by justlive1.
the class RouteRegisterFactory method parseVertxRoute.
/**
* 解析{@code VertxRoute}注解的route类
*
* @param clazz
*/
private void parseVertxRoute(Class<?> clazz) {
VertxRoute route = clazz.getAnnotation(VertxRoute.class);
Object bean;
try {
bean = clazz.newInstance();
} catch (InstantiationException | IllegalAccessException e) {
throw Exceptions.wrap(e);
}
String root = transferUri(route.value());
Method[] methods = clazz.getMethods();
for (Method method : methods) {
if (method.isAnnotationPresent(VertxRouteMapping.class)) {
parseVertxRouteMapping(root, method, bean);
}
}
}
Aggregations