Validation error: “No validator could be found for type: java.lang.Integer”

前端 未结 5 475
故里飘歌
故里飘歌 2021-02-04 23:06

I am working on a project with Spring why do I keep getting the following error?

javax.validation.UnexpectedTypeException:
No validator could be fou

5条回答
  •  难免孤独
    2021-02-04 23:51

    For this type error: UnexpectedTypeException ERROR: We are trying to use incorrect Hibernate validator annotation on any bean property. For this same issue for my Springboot project( validating type 'java.lang.Integer')

    The solution that worked for me is using @NotNull for Integer.

提交回复
热议问题