springboot报错‘url’ attribute is not specified and no embedded datasource could

APPLICATION FAILED TO START

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).
1、首先看连接datasource数据库的配置写了没,就是下面代码有没有在配置文件中写

spring:
  datasource:
      username: aa
      password: aa
      url: 数据库连接地址
      driver-class-name: oracle.jdbc.OracleDriver

2、如果有,在application.yml配置文件中修改端口名为7777,再重新运行,看报错提示信息的端口,如果端口不是7777,证明没有进入application.yml,按eclipse的maven-update project勾选force update

server:
	port: 7777

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-16 01:12:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-16 01:12:03       100 阅读
  3. 在Django里面运行非项目文件

    2024-05-16 01:12:03       82 阅读
  4. Python语言-面向对象

    2024-05-16 01:12:03       91 阅读

热门阅读

  1. 第十一周学习笔记DAY.1-MySQL

    2024-05-16 01:12:03       36 阅读
  2. mysql 索引失效的原因

    2024-05-16 01:12:03       31 阅读
  3. 设计模式:备忘录模式

    2024-05-16 01:12:03       32 阅读
  4. 数据特征降维 | 主成分分析(PCA)附Python代码

    2024-05-16 01:12:03       34 阅读
  5. sophgo sdk v23.03.01

    2024-05-16 01:12:03       34 阅读
  6. js遇到需要正则匹配来修改img标签+清除行内样式

    2024-05-16 01:12:03       32 阅读
  7. SpringMVC dubbo项目测试用例

    2024-05-16 01:12:03       34 阅读
  8. 测试萌新的Python学习pytest(六)

    2024-05-16 01:12:03       31 阅读