'Spring 2.6.7: Failed to configure a DataSource: 'url' attribute

I have created a new Spring Starter Project and I specified in application.properties the db settings:

spring.jpa.hibernate.ddl-auto=update
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
spring.datasource.url=jdbc:mysql://localhost:3306/mydb?&useLegacyDatetimeCode=false&serverTimezone=UTC&useUnicode=yes&character_set_server=utf8mb4
spring.datasource.username=.....
spring.datasource.password=.....

in pom.xml I have the mysql dependency:

<dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
</dependency>

I have also done maven -> Update....

When starting the project the console says:

***************************
APPLICATION FAILED TO START
***************************

Description:

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine a suitable driver class

I don´t understand..i just provided what he needs...the datasource.url...

When I change the spring version to 2.3.0.RELEASE...it works. But why not with the newer one 2.6.7 (which should be stable)?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source