zizo 04
zizo 04

Reputation: 1

The last Spring boot validation not working

I'm a beginner in spring boot and I found a problem with validation It doesn't work and I tried spring validation also hibernate dependency. I have the last version of spring boot 2.7.2 I add
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId> </dependency> to my pom.xml but when I add @NotNull to my bean gave me an error, and showed me there's not a @NonNull Annotation.

Upvotes: 0

Views: 695

Answers (1)

Kundan Kumar
Kundan Kumar

Reputation: 43

I faced the same issue. In my case, there was a problem with my pom. I had a dependency on the hibernate-validator. So I removed and worked for me.

Upvotes: 1

Related Questions