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

╰+攻爆jí腚メ 2023-06-16 14:52 115阅读 0赞

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

解决了上一个错误之后,又出现了新的错误:Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured

根据英文意思应该是没有配置数据源,导致的错误,只需要在application.properties中添加即可:

  1. spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
  2. spring.datasource.url=jdbc:oracle:thin:@127.0.0.1:1521:ORCL
  3. spring.datasource.username=zhangsan
  4. spring.datasource.password=zhangsan

项目成功启动。

发表评论

表情:
评论列表 (有 0 条评论,115人围观)

还没有评论,来说两句吧...

相关阅读