dataSource' defined in class path resource [org/springframework/boot/autocon
spring boot启动的时候抛出如下异常:
dataSource' defined in class path resource [org/springframework/boot/autocon
Cannot determine embedded database driver
class
for
database type NONE
Action:
If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular
profile you may need to active it (no profiles are currently active).
这是因为spring boot 会默认加载
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration 这个类
DataSourceAutoConfiguration类使用了@Configuration注解向spring注入了dataSource bean。因为工程中没有关于dataSource相关的配置信息,当spring创建dataSource bean因缺少相关的信息就会报错。
解决办法发是:
在Application类上增加
@EnableAutoConfiguration
(exclude={DataSourceAutoConfiguration.
class
})
dataSource' defined in class path resource [org/springframework/boot/autocon的更多相关文章
- Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method fail
SpringBoot 单元测试报错 @RunWith(SpringRunner.class) @SpringBootTest public class ProductCategoryRepositor ...
- Error creating bean with name 'persistenceExceptionTranslationPostProcessor' defined in class path resource [org/springframework/boot/autoconfigure/dao/PersistenceExceptionTranslationAutoConfiguration
dubbo 包和SpringBoot 冲突,注释就可以正常启动
- MyBatis笔记----(2017年)最新的报错:Cannot find class [org.apache.commons.dbcp.BasicDataSource] for bean with name 'dataSource' defined in class path resource [com/ij34/mybatis/applicationContext.xml]; nested e
四月 05, 2017 4:56:11 下午 org.springframework.context.support.ClassPathXmlApplicationContext prepareRef ...
- Invalid bean definition with name 'dataSource' defined in class path resource [applicationContext.xml]
启动tomcat,访问一个web项目失败,查看日志,发现异常信息: 18-Jul-2019 15:22:16.822 严重 [main] org.apache.catalina.core.Standa ...
- Cannot find class [org.apache.commons.dbcp.BasicDataSource] for bean with name 'dataSource' defined in class path resource [applicationContext.xml]
Cannot find class [org.apache.commons.dbcp.BasicDataSource] for bean with name 'dataSource' defined ...
- A bean with that name has already been defined in class path resource [org/springframework/transaction/annotation/ProxyTransactionManagementConfiguration.class] and overriding is disabled
2019-12-19 13:26:17.594 WARN [main] o.s.boot.web.servlet.context.AnnotationConfigServletWebServerApp ...
- 启动zuul时候报错:The bean 'proxyRequestHelper', defined in class path resource [org/springframework/cloud/netflix/zuul
启动zuul时候报错:The bean 'proxyRequestHelper', defined in class path resource [org/springframework/cloud/ ...
- 报Error creating bean with name 'dataSource' defined in class path resource 报错解决办法
在学习spring boot 的数据库操作的时候,报了一串错误 对于初学spring boot的我来说,英语水平低,看不懂报错的信息,给我造成了很大的麻烦,花了我一天的时间,经过不懈的努力后终于让我找 ...
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [app2.xml]: Instantiation of bean failed; nested exception is org.spr
在学习spring整合hubernate时遇到的问题.c3p0遇到了一个问题,老连不上,显示java.lang.NoClassDefFoundError:com.mchange.v2.ser.Indi ...
随机推荐
- 重载和const形参的学习心得
在C++ primer 5th中,第6章的练习6.39(a)中,关于重载和const形参的学习心得. 练习6.39:说明在下面的每组声明中第二条声明语句是何含义.如果有非法的声明,请指出来. (a) ...
- force
题意 求解 Ei = Fi/qi 解法: 方法一: 考虑左侧的式子,直接多项式乘法. 对于右面的式子,我们记做$B_j$,这样有 $$B_j = \sum_{j<i}{ revq_{n-i} f ...
- ThinkPHP3.2.3中,查询语句中in的使用方法。
//删除分类 public function del(){ $cid = I('get.cid'); $cate = M('category')->field('cid,pid')->se ...
- Visual Studio 2010下WorldWind编译问题集合
首先:获取WORLDWIND最新代码——建议不要直接下载源代码包进行编译,一是因为它并不是最新版本的代码,WW的代码最近经常更新:二是缺很多依赖的类库.建议用TortoiseSVN客户端从source ...
- 支持lua的框架和ide
1.Kony http://mobilehub.io/products/kony 2.CryEngine http://mobilehub.io/products/cryengine 3.Dragon ...
- E20190404-hm
prepend vt. 预先考虑,预先计划,预谋;
- MySQL之避免插入重复数据
INSERT ignore INTO `$table_name`($field_name) VALUES(),(),(),()"; //若重复数据可以添加,请在对应的数据表字段中添加数据库索 ...
- 用css写三角形,宽高可设置
1.不传@h,@c === @h; 2.元素width = @w, 元素height = @h*2 3.配合上.center()实现图标居中 less版本: //上下左右居中 .center(){ p ...
- uoj#79. 一般图最大匹配(带花树)
传送门 带花树 不加证明的说一下过程好了:每次从一个未匹配点\(S\)出发bfs,设\(S\)为\(1\)类点,如果当前点\(v\)在本次bfs中未经过,分为以下两种情况 1.\(v\)是未匹配点,那 ...
- app发布证书、真机调试证书、测试证书、推送证书详细过程
原文网址: http://www.cnblogs.com/cxbblog/p/4028159.html 一:发布证书 遵旨:哪个开发者的哪台电脑要发布哪个app (这句话可以多读几遍) 通过上边的遵旨 ...