Search code examples
spring-boot-starter

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


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.sstatic.net/Cd7uN.png)


Solution

  • <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.