Failed to configure a DataSource: ‘url‘ attribute

2023-05-16

一 完整的错误信息

***************************
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. 配置文件,发现配置文件存在,排除。

       2. 配置信息,发现存在一个空格,将配置文件的多余空格删除,无效,排除。

        3. 明明存在配置文件,在保证配置信息完整的前提下,不起作用,网上又说使用@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}),但是系统确实需要数据库操作,所以不采纳。

        4. POM配置,最后真的发现问题了,因为POM文件中增加了配置信息

<excludes>
     <exclude>*.yml</exclude>
     <exclude>*.xml</exclude>
     <exclude>**/template/</exclude>
</excludes>

        换成下面配置信息即可。

<includes>
   <include>**/*.xml</include>
   <include>**/*.yml</include>
</includes>
<filtering>true</filtering>

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Failed to configure a DataSource: ‘url‘ attribute 的相关文章

  • android: 是否可以将给定的 xml(从 URL)文件下载到磁盘?

    例如 我有一个网址http somedomain com sync login go123 go http somedomain com sync login go123 go它给出了一个 XML 如果你要在 Web 浏览器 我使用 Fir
  • 如何用Python制作独特的短网址?

    如何在Python中创建唯一的URLhttps i stack imgur com turb6 jpg https i stack imgur com turb6 jpg or http tumblr com xzh3bi25y http
  • PHP 在 URL 中使用 cURL 和 GET 请求

    我使用 cURL 而不是 file get contents 它在 URL 上运行良好 直到我使用 GET 请求变量代替下面 URL 上的城市 在以下方面使用 cURL 有效 url http www weather forecast co
  • Angular 路由器:忽略路径参数中的斜杠

    我有动态路线could参数内包含斜杠或反斜杠 例如 http localhost 4200 dashboard T64 27D我应该导航到带有路线的页面T64 27D 这是我的导航方式this router navigate dashboa
  • 使用 JSON 字符串解析 URL 时捕获 IllegalArgumentException

    我需要使用 JSON 数据制定一个 url 如下所示 http someurl com passfail parameter http someurl com passfail parameter data1 123456789 data2
  • URL 中的 ^ 符号是什么意思?

    URL 中的 符号是什么意思 我需要从网页上抓取一些链接数据 我使用了一个简单的手写 PHP 爬虫 爬虫通常工作正常 然后我来到一个像这样的网址 http www example com example asp x7 3 select 20
  • 提交表单时不要包含空参数

    我的控制器上的索引方法如下所示 public ActionResult Index string search string sort int groupId 对于搜索功能 我有以下形式 using Html BeginForm div H
  • Python urllib2 响应头

    我正在尝试提取 URL 请求的响应标头 当我使用firebug分析URL请求的响应输出时 它返回 Content Type text html 但是当我使用 python 代码时 urllib2 urlopen URL info 结果输出返
  • Go 中的 URL 生成器/查询生成器

    我感兴趣的是通过浏览器或 CLI 动态获取用户的参数作为输入 将这些参数传递给 REST API 调用 从而使用 Go 动态构建 URL 最终为我获取一些 JSON 数据 我想了解 Go 中的一些技术可以帮助我做到这一点 我认为一种理想的方
  • 如何检查我的 Node.js 服务器正在哪个 URL 中运行?

    我有两台服务器 db mydomain com 和 db2 mydomain com 用于开发 如何检查我的代码在哪个服务器上运行 我想从生产数据而不是开发数据中备份数据 关于如何做到这一点有什么想法吗 您可以在任何请求中获取主机名 app
  • PHP - 完整的 url 解析器帮助

    我一直在试图找到一个有效的url解析器 php自己的不包含子域或扩展名 在 php net 上 许多用户做出了贡献并做出了以下贡献 function parseUrl url r P
  • URI 中的路径可以包含 unicode 吗?

    有效的 URL 是否可以包含非转义的 Unicode 字符 是的 URI 中允许未转义的 ASCII 以及 Unicode 子集 例如字母和数字 但大多数 Unicode 字符集都必须进行百分比编码
  • 如何使用 JSON URL

    我有一个 JSON 对象 看起来像这样 以下链接是假的 results urlStuff pic url http www youtube com inside kslkjfldkf 234 jpg v 7475646 other pic
  • Windows 共享文件夹的 URL [重复]

    这个问题在这里已经有答案了 有没有办法合并一个working将 Windows 共享文件夹链接到 HTML 页面 例如 链接到 server folder path 为简单起见 假设该页面将在 Windows 计算机上打开 并且在同一 In
  • 如何获取 URL 中最后一个斜杠之后的所有内容?

    如何在 Python 中提取 URL 中最后一个斜杠后面的内容 例如 这些 URL 应返回以下内容 URL http www test com TEST1 returns TEST1 URL http www test com page T
  • 使用java从奇怪但有效的url获取域

    我需要从此网址获取主机 android app com google android googlequicksearchbox Pub id siteID java net URL and java net URI无法处理它 问题在于 an
  • #的目的是什么!在网址中[重复]

    这个问题在这里已经有答案了 可能的重复 Facebook 和新 Twitter URL 中的 shebang 有何用途 https stackoverflow com questions 3009380 whats the shebang
  • 有没有办法获取 Facebook 中消息线程的 ID? [关闭]

    Closed 这个问题需要细节或清晰度 help closed questions 目前不接受答案 如果我从用户的消息中获得 Facebook 线程的 URL 有没有办法获取该线程的 id 我知道如何在给定 id 的情况下构造 url 但反
  • 使 CSS url() 相对于文档

    当涉及 CSS 时 适用以下规则 Partial URLs are interpreted relative to the source of the style sheet not relative to the document 但这是
  • “url”、“src”和“href”之间的区别[重复]

    这个问题在这里已经有答案了 可能的重复 SRC 和 HREF 之间的区别 https stackoverflow com questions 3395359 difference between src and href 当编写 html

随机推荐