I have a Spring boot application. My request classes passed to my @RestController
contains javax.validation
annotations which I cannot change/remove - they come as a 3rd party library. So I want to validate my request objects manually or don't validate them at all. Unfortunately if I add either:
spring-boot-starter-validation
- to haveValidator
bean preconfigured orvalidation-api
andhibernate-validator
- to create aValidator
by myself
Spring automatically enables validation for all my @RestController
s.
Is it possible to disable automatic validation in Spring?