private boolean isValidFormPostMethod(final Class<?> clazz, final Method method) {
if (AnnotationUtils.findAnnotation(clazz, Controller.class) == null) {
return false;
}
RequestMapping methodAnnotation = AnnotationUtils.findAnnotation(method, RequestMapping.class);
if (methodAnnotation == null) {
return false;
}
RequestMapping classAnnotation = AnnotationUtils.findAnnotation(clazz, RequestMapping.class);
boolean hasValue = false;
if (classAnnotation != null) {
hasValue = (classAnnotation.value() != null && classAnnotation.value().length > 0);
}
if (!hasValue) {
hasValue = (methodAnnotation.value() != null && methodAnnotation.value().length > 0);
}