欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Cannot load driver class: com.mysql.jdbc.Driver

程序员文章站 2024-02-22 11:04:58
...

Cannot load driver class: com.mysql.jdbc.Driver

配置文件application.properties中一直是红色springboot启动错误

spring.datasource.driver-class-name=com.mysql.jdbc.Driver

需要在pom.xml中配置

 <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
相关标签: spring boot