Issue
I added dependency for spring-boot-starter-data-jpa
and spring-boot-starter-jdbc
and mysql-connector-java
.
And I get problem: "missing artifact javax .validation:validation-api:jar:2.0.1 final.
"
How can I solve it?
Solution
Make sure you have spring-boot-starter-web
dependency in you pom as javax.validation
is part of it..and run mvn clean install
once to reload all dependency.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
see web dependency tree here..javax.validation:validation-api:jar:2.0.1.Final
org.springframework.boot:spring-boot-starter-web:jar:2.0.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.0.4.RELEASE:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile
[INFO] | | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] | | | \- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.6:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.6:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.6:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.4.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.32:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.32:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.32:compile
[INFO] | +- org.hibernate.validator:hibernate-validator:jar:6.0.11.Final:compile
[INFO] | | \- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | +- org.springframework:spring-web:jar:5.0.8.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:5.0.8.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:5.0.8.RELEASE:compile
Answered By - kj007