In my Spring Boot application, I have used Spring Boot version:
<version>2.0.4.RELEASE</version>
and also MySQL connector dependency:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
Note that no version is mentioned for this dependency, meaning it inherits version from parent pom.
I changed Spring Boot version to 2.7.18, but I see that now Maven complains about MySQL dependency version missing, and I have to modify dependency as:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.32</version>
<scope>runtime</scope>
</dependency>
What’s the reason for this behaviour?