spring boot 2.0 报错:“jdbcUrl is required with driverClassName.” 解决办法!

springboot 升级到2.0之后发现配置多数据源的时候报错:

“jdbcUrl is required with driverClassName.”或者Cause: java.lang.IllegalArgumentException: dataSource or dataSourceClassName or jdbcUrl is required.] with root cause

主要原因是在1.0 配置数据源的过程中主要是写成:spring.datasource.url 和spring.datasource.driverClassName。

而在2.0升级之后需要变更成:spring.datasource.jdbc-url和spring.datasource.driver-class-name即可解决!

刚开始解决这个问题用了半天时间,由于是版本刚更新没多久 在网上搜不到答案 后来无意中看了一篇论坛才焕然大悟,希望各位道友不要重蹈覆辙!

原文地址:https://blog.csdn.net/weixin_40085570/article/details/80968099

原文地址:https://www.cnblogs.com/jpfss/p/11083485.html

时间: 2024-07-30 04:30:36

spring boot 2.0 报错:“jdbcUrl is required with driverClassName.” 解决办法!的相关文章

spring boot 整合kafka 报错 Exception thrown when sending a message with key='null' and payload=JSON to topic proccess_trading_end: TimeoutException: Failed to update metadata after 60000 ms.

org.springframework.kafka.support.LoggingProducerListener- Exception thrown when sending a message with key='null' and payload='{"dataDts":["20180329","20180328","20180327","20180326","20180323"]

Spring Boot配置FastJson报错'Content-Type' cannot contain wildcard type '*'

https://www.cnblogs.com/xiaopotian/p/8654993.html 升级到最新版本的fastjson以后报的错,查了一下资料,发现 fastjson从1.1.41升级到1.2.28之后,请求报错:json java.lang.IllegalArgumentException: 'Content-Type' cannot contain wildcard type '*' 原因是在1.1.41中,FastJsonHttpMessageConverter初始化时,设置

linux上项目报错找不到主机名解决办法

项目报错找不到主机名解决办法 有时候我们的项目在本地运行没问题,但部署到linux服务器上就出错了. 报错:java.net.UnknownHostException: 主机名: 主机名  找不到主机名. 解决方法: 修改服务器上/etc/hosts文件 127.0.0.1  localhost  localhost.localdomain 添加所需的主机名称 或者 127.0.0.1  localhost  localhost.localdomain 127.0.0.1  添加所需的主机名称

[Zend Studio]报错问题,项目无法启动解决办法

今天启动Zend Studio报错了,其实这种事经常发生. 但大多数情况我还是用一种简单粗暴的方法: 方法1.把整个工作区间删除,然后又重新创建每个项目 当然如果这个工作区里面的项目少的话,这么搞没什么.如果多的话挺蛋疼的! 所以建议多设置几个工作区,每个工作区项目数不超过5个!有点跑题了... 方法2.删除下面路径里面的所有.snap文件         C:\Users\xxx用户\Zend\workspaces\xxx工作区\.metadata\.plugins\org.eclipse.c

PHP安装mcrypt.so报错 mcrypt.h not found 的解决办法

报错内容:configure: error: mcrypt.h not found. Please reinstall libmcrypt 网上搜索了很多,包括自带的 yum install libmcrypt libmcrypt-devel,这个是没有效果的. 去SourceForget下载libmcrypt http://sourceforge.net/projects/mcrypt/files/Libmcrypt/ ,最新版是mcrypt 2.6.7.gz.下载下来安装仍旧报错libmcr

Navicat 连接MySQL数据库 报错2059 - authentication plugin 'caching_sha2_password'的解决办法

#在数据库的命令行中输入以下代码即可解决,密码必须要修改 可以再次执行将密码改回来. use mysql; ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; Navicat 连接MySQL数据库 报错2059 - authentication plugin 'caching_sha2_password'的解决办法 原文地址:https://www.cnblogs.com/liuha

IDEA下spring boot+fremarker启动报错would dispatch back to the current handler URL [/hello] again. Check your ViewResolver setup!

详细报错代码(ps:标题中写不下报错主要代码) javax.servlet.ServletException: Circular view path [hello]: would dispatch back to the current handler URL [/hello] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default vie

关于spring boot项目启动报错问题

这次用了spring boot,项目在启动时报错,由于我用的是jdk 1.7 ,该项目默认的是jdk 1.8,所以要把下面这一系列配置改好才行.废话不多说,上图: 一看发现,项目环境没有配全,打开file->Project Structuer,找到Project ,把里面的jdk配置成你自己的. 还有Modules里面的的这几项: 然后找到file->setting-->Java Compiler 里面 这些都配置好才能起动main函数启动服务.

Spring Boot连接MySQL报错“Internal Server Error”的解决办法

报错信息如下: {timestamp: "2018-06-14T03:48:23.436+0000", status: 500, error: "Internal Server Error",-} error : "Internal Server Error" message : "Could not open JDBC Connection for transaction; nested exception is java.sql.S