数据库配置
来源:4-13 集成Mybatis持久层框架

IMYOKO
2023-11-02
配置完数据库就没有启动成功,报错如下,
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
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
Process finished with exit code 0
数据库配置如下
数据库配置
spring.datasource.url=jdbc:mysql://localhost:3306/train_member
spring.datasource.username=train_member
spring.datasource.password=123456
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
2回答
-
慕仙6287767
2024-03-21
可能是配置文件类型的问题,你可以考虑把配置文件换成yml格式。
00 -
甲蛙
2023-11-06
没遇到过你这个错,检查下pom.xml依赖和课程是否一致
00
相似问题