application.properties не видит com.mysql.cj.jdbc.Driver

у меня ошибка в spring-boot приложении (Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource:),

Reason: Failed to load driver class com.mysql.cj.jdbc.Driver in either of HikariConfig class loader or Thread context classloader

я решил добавить com.mysql.cj.jdbc.Driver в мой application.propertis, но он попросту его не видит.

Скрин : введите сюда описание изображения

что сделать чтобы он увидел драйвер и пропала основная ошибка?

pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <properties>
        <spring-boot-version>2.3.4.RELEASE</spring-boot-version>
        <mySql-connector-version>8.0.22</mySql-connector-version>
        <caffeint-version>2.8.6</caffeint-version>
        <java.version>1.8</java.version>
    </properties>

    <groupId>com.example</groupId>
    <artifactId>sweater</artifactId>
    <version>1.0-SNAPSHOT</version>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.2.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <dependencies>

        <!-- caching spring-boot with caffeine -->

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-cache</artifactId>
            <version>${spring-boot-version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.ben-manes.caffeine</groupId>
            <artifactId>caffeine</artifactId>
            <version>${caffeint-version}</version>
        </dependency>

        <!-- ==================================== -->

        <!-- mysql database and spring-boot data -->

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
            <version>${spring-boot-version}</version>
        </dependency>
        <dependency>

            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>${mySql-connector-version}</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>5.4.22.Final</version>
        </dependency>


        <!-- ==================================== -->


        <!-- other spring-boot tools -->

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
            <version>${spring-boot-version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>${spring-boot-version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <version>${spring-boot-version}</version>
            <optional>true</optional>
        </dependency>

        <!-- ==================================== -->

        <!-- tomcat server -->

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <version>${spring-boot-version}</version>
        </dependency>

        <!-- ==================================== -->
    </dependencies>


    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>

Ответы (0 шт):