Spring Boot应用部署Linux环境时出现Failed to determine a suitable driver class错误的排查求助
Spring Boot应用部署Linux环境时出现Failed to determine a suitable driver class错误的排查求助
我使用的Spring Boot版本是3.4.1,在IntelliJ IDE中运行应用一切正常,但尝试部署到Linux环境时遇到了如下错误:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration': Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception with message: Failed to determine a suitable driver class
我的配置文件内容如下:
spring.datasource.url=jdbc:mariadb://localhost:3306/database spring.datasource.username=username spring.datasource.password=password spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
pom.xml中的相关依赖配置:
<dependency> <groupId>org.mariadb.jdbc</groupId> <artifactId>mariadb-java-client</artifactId> <scope>runtime</scope> </dependency>
请问我哪里遗漏了?谢谢!
备注:内容来源于stack exchange,提问作者user30091549
相关产品推荐
相关产品推荐

