Spring boot 2.7 'dependencies.dependency.version' for com.mysql:mysql-connector-j:jar

155 views Asked by At

I am upgrading Java 8 to Java 17

Spring Batch 2.3.3 to 2.7

here are the changes enter image description here

I got the error with my-sql connector ..

changed it to enter image description here

Reloaded maven dependencies .. when I run I still get 'dependencies.dependency.version' for com.mysql:mysql-connector-j:jar is missing.

how do I fix this?

(https://i.stack.imgur.com/Cd7uN.png)

1

There are 1 answers

0
user1419261 On BEST ANSWER
<dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>

adding the runtime tag along the spring-batch depencies got it fixed.