I am trying to set up an integration testing with mockMvc, and i have a problem with it. Indeed, spring doesn\'t integrate any validation annotation.
For more precisio
Ok, I have just found what is responsible for the fact that validation was not consider by mockmvc. It's just a bad dependency in my pom:
I used
org.hibernate
hibernate-validator
5.1.0.Final
and when i replaced it by
javax.validation
validation-api
1.0.0.GA
org.hibernate
hibernate-validator
4.1.0.Final
the test work just fine!
the problem is solved, but I am wondering why the problem comes from this part. hibernate-validator 5.1.0.Final include javax validation in transitive dependency, so normally, this problem would never have appeared.