|
|
|
@ -67,7 +67,6 @@ import org.springframework.util.Assert; |
|
|
|
import org.springframework.util.ClassUtils; |
|
|
|
import org.springframework.util.ClassUtils; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
import org.springframework.util.PathMatcher; |
|
|
|
import org.springframework.util.PathMatcher; |
|
|
|
import org.springframework.validation.Errors; |
|
|
|
|
|
|
|
import org.springframework.validation.Validator; |
|
|
|
import org.springframework.validation.Validator; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
@ -309,8 +308,7 @@ public class SimpAnnotationMethodMessageHandler extends AbstractMethodMessageHan |
|
|
|
resolvers.add(new MessageMethodArgumentResolver()); |
|
|
|
resolvers.add(new MessageMethodArgumentResolver()); |
|
|
|
|
|
|
|
|
|
|
|
resolvers.addAll(getCustomArgumentResolvers()); |
|
|
|
resolvers.addAll(getCustomArgumentResolvers()); |
|
|
|
resolvers.add(new PayloadArgumentResolver(this.messageConverter, |
|
|
|
resolvers.add(new PayloadArgumentResolver(this.messageConverter, this.validator)); |
|
|
|
(this.validator != null ? this.validator : new NoOpValidator()))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return resolvers; |
|
|
|
return resolvers; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -457,17 +455,4 @@ public class SimpAnnotationMethodMessageHandler extends AbstractMethodMessageHan |
|
|
|
return new AnnotationExceptionHandlerMethodResolver(beanType); |
|
|
|
return new AnnotationExceptionHandlerMethodResolver(beanType); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final class NoOpValidator implements Validator { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean supports(Class<?> clazz) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void validate(Object target, Errors errors) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|