Caught exception while allowing TestExecutionListener

严重: Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@4dfa3a9d] to prepare test instance [com.cskaoyan.Mytest@5d47c63f]
java.lang.IllegalStateException: Failed to load ApplicationContextat org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:132)at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:123)at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:118)at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:244)at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227)at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246)at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)at org.junit.runners.ParentRunner.run(ParentRunner.java:413)at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)at org.junit.runner.JUnitCore.run(JUnitCore.java:137)at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.cskaoyan.config.ApplicationConfiguration]; nested exception is java.io.FileNotFoundException: class path resource [db.properties] cannot be opened because it does not existat org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:188)at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:319)at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:236)at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:280)at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:96)at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:707)at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:533)at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:128)at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:275)at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:243)at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99)at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124)... 25 more
Caused by: java.io.FileNotFoundException: class path resource [db.properties] cannot be opened because it does not existat org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180)at org.springframework.core.io.support.EncodedResource.getInputStream(EncodedResource.java:159)at org.springframework.core.io.support.PropertiesLoaderUtils.fillProperties(PropertiesLoaderUtils.java:99)at org.springframework.core.io.support.PropertiesLoaderUtils.fillProperties(PropertiesLoaderUtils.java:73)at org.springframework.core.io.support.PropertiesLoaderUtils.loadProperties(PropertiesLoaderUtils.java:59)at org.springframework.core.io.support.ResourcePropertySource.<init>(ResourcePropertySource.java:67)at org.springframework.core.io.support.DefaultPropertySourceFactory.createPropertySource(DefaultPropertySourceFactory.java:37)at org.springframework.context.annotation.ConfigurationClassParser.processPropertySource(ConfigurationClassParser.java:462)at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:279)at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:249)at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:206)at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:174)... 37 more

使用注解 @EnableTransactionManagement 开启事务支持后,没有添加注解 @Transactional

Caught exception while allowing TestExecutionListener相关推荐

  1. 严重: Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.

    严重: Caught exception while allowing TestExecutionListener [org.springframework.test.context.support. ...

  2. Caught exception while allowing TestExecutionListener异常日志

    严重: Caught exception while allowing TestExecutionListener [org.springframework.test.context.support. ...

  3. Exception: Caught exception while allowing TestExecutionListener

    前提 SpringBoot版本 <parent><groupId>org.springframework.boot</groupId><artifactId& ...

  4. ERROR TestContextManager:234 - Caught exception while allowing TestExecutionListener [org.springfram

    由于一些不可抗力因素的影响,在idea中进行单元测试出现了如下异常 @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration({&qu ...

  5. Caught exception while allowing TestExecutionListener spring-mvc 单元测试出现的问题

    @Autowired UserServiceimpl us; 在spring-mvc单元测试时,注入的是接口,而不是接口的实现,希望大家能避开这个坑 405 ERRORTestContextManag ...

  6. Caught exception while allowing TestExecutionListener [org.xx.ServletTestExecutionListener@xx]

    springboot测试类启动报错 ERROR org.springframework.test.context.TestContextManager  : Caught exception whil ...

  7. Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.Depe

    项目场景: 在Spring单元测试的时候容易发生的bug 问题描述: 严重: Caught exception while allowing TestExecutionListener [org.sp ...

  8. 【ClickHouse】<Error> Application: Caught exception while loading metadata: Code: 231. DB::Exception

    异常描述 重启clickhouse后,发现服务一直不可用,日志报错: <Error> Application: Caught exception while loading metadat ...

  9. WARN hdfs.DataStreamer: Caught exception

    在向hdfs上传文件的时候,报了这么一个错: Exception in thread "main" java.lang.RuntimeException: org.apache.h ...

最新文章

  1. Qt 使用代码编写的自定义控件类
  2. php 使用 array_reduce 实现多维数组分组(groupby)聚合
  3. Android中添加自己的模块 【转】
  4. c# 在winform中为DataGridView头部标题添加ContextMenuStrip菜单
  5. python pycharm 无法import win32api、win32con、win32com、win32gui 问题一次解决!方法合集
  6. matlab常微分方程2次初值问题,MATLAB求解二阶常微分方程初值问题
  7. java 批量修改图片名称_java 批量修改文件名称
  8. IntentService使用姿势
  9. 在Visual Studio中对Epicor10进行二次开发
  10. 【pytest】三、pytest用例管理框架的前后置(固件、夹具)setup和teardown,及封装
  11. 棋牌游戏开发之地主算法判断牌型
  12. 图的邻接表存储实现(第七章 P163)
  13. Docker 进入Mysql容器
  14. 口布杯花的60种叠法_史上最全的口布花折法教程,简单实用!超美呦~
  15. 模拟100个 正态分布的随机数,计算其样本均值和样本方差,观察其余真实值的差异。当增大样本容量时,其差异有何规律。
  16. 广东工业大学计算机科学与技术研究生,2021年广东工业大学计算机科学与技术(081200)考研专业目录_硕士研究生考试范围 - 学途吧...
  17. ubuntu系统出错且无法恢复请联系管理员(A problem has occurred and the system can‘t recover,please contact the admini)
  18. bzoj3505 / P3166 [CQOI2014]数三角形
  19. 品优购商城——注册页
  20. 《A Template for Understanding Big Debt Crises》 pdf、mobi、epub下载

热门文章

  1. 【地图服务】实现地图上 打点 连线的功能
  2. 华为认证HCIA+HCIP题库(超500题含答案解析)
  3. 《讲个故事》cookie是什么
  4. HTTP请求报文的结构组成及URL的结构组成
  5. 别再跟风报经济师专业,五点教你如何选择
  6. 批量构造四阶类自然数奇偶简单幻立方的一种方法
  7. 气象数据随时随地:让天气预报API为您的应用提供精准的天气信息
  8. vcsynopsys 的RDC问题分析
  9. 统计初级专业资格证知识点
  10. 倒车喇叭语音ic芯片