SpringBoot测试类启动错误 java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
报错 java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
......
......
......
......
......
......
......
我当时运行SpringBoot测试类的时候踩这个坑,当时的解决办法就是,原本的包名为test现在改为panfeng就行了.

这里的主配置类也就是`PanfengUploadApplication`所在包是 java 下的 `panfeng`
所以测试类的`FastDFSTest`也要在 java 下的 `panfeng`包
SpringBoot测试类启动错误 java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test的更多相关文章
- springboot测试启动报错java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
springboot测试启动报错: java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you ne ...
- maven打包错误:java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.118 sec <<< FAILURE! - in ...
- java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
写了一个单元测试test来启动activiti,controller放在src/main/java根目录下,test对应也放在src/test/java下,结果报错: java.lang.Illega ...
- 使用SpringBoot整合MybatisPlus出现 : java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
解决方案一: 将测试类的包路径改为和主启动类的一致 解决方法二: 不想改测试类的路径 就在测试类上添加要测试的类的classes
- java.lang.IllegalStateException Unable to find a @SpringBootConfiguration错误解决方案
问题描述:java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @Co ...
- Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test java.lang.IllegalStateException
不能找到对应的带有@SpringBootConfiguration 的类,你需要将它放在包的最顶层.
- tomcat启动时检测到循环继承而栈溢出的问题:Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/test] due to a StackOverflowError. Possible root causes include
最近在公司更新一个老项目的时候,发现部署项目后tomcat报错,错误如下: Caused by: java.lang.IllegalStateException: Unable to complete ...
- myeclipse 无法启动 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
把myeclipse10 按照目录完整拷贝到了另外一台电脑, 另外的目录 原安装目录 D\:\soft\i\myeclipse10 新安装目录 E\:\soft\myeclipse10 双击启动失败, ...
- 处理eclipse启动时报java.lang.IllegalStateException
这是我写的第一篇博客,博客我来了: 我是好学的人,希望在这上面遇到志同道合的人,对技术有更高追求的人: 重启eclipse的时候报出来 An error has occurred, See the l ...
随机推荐
- 20175212童皓桢 实验四 Android程序设计
20175212童皓桢 实验四 Android程序设计 实验内容 参考<Java和Android开发学习指南(第二版)(EPUBIT,Java for Android 2nd)>并完成相关 ...
- 第九周总结&实验报告七
小结:这周请了一天的假,所以回来的时候有些知识点跟不上,不过在第二节课学到了关于IO的知识很重要,对于这次的实验也有些吃力,这周的知识点主要集中在书上,在各种不同条件下学习运用什么样的代码. 一. ...
- 一、基础篇--1.2Java集合-List、Set、Map区别
List.Set.Map区别 三者关系如下: 结构特点 1.List和Set是存储单列数据集合,Map是存储键值对这样的双列数据集合: 2.List中存储的数据都是有序的,并且允许重复:Map中存储 ...
- 自动化框架Quantum Automation Framework+cucumber+perfecto
名词解释 Quantum: 一款基于JAVA的自动化框架,支持手机和桌面WEB的自动化测试.与cucumber和perfecto实现了整合,用于BDD自动化. Refer: http://projec ...
- DAY 4模拟赛
DAY 4 zhx出题 T1 裂变链接 [问题描述] 你是能看到第一题的 friends 呢. ——hja 众所周知,小葱同学擅长计算,尤其擅长计算组合数,但这个题和组合数没什么关系. 现在有
- 学习笔记 - MarkDown 语法
学习参考网址:https://www.appinn.com/markdown/index.html # **gitskill** ## 标题 ># 这是 H1 >## 这是 H2 > ...
- JAVA基础面试汇总
一.基础知识:1.JVM.JRE和JDK的区别: JVM(Java Virtual Machine):java虚拟机,用于保证java的跨平台的特性. java ...
- python 生成excel,并下载到本地
from django.shortcuts import reverse,redirect,render from operations import models import xlwt impor ...
- 线性模型-线性回归、Logistic分类
线性模型是机器学习中最简单的,最基础的模型结果,常常被应用于分类.回归等学习任务中. 回归和分类区别: 回归:预测值是一个连续的实数: 分类:预测值是离散的类别数据. 1. 线性模型做回归任务 ...
- 在Linux上实现Python调用C语言函数
一般思路 Python中内置ctypes库,需调用c编译成的.so文件来实现函数调用. 假设我们所需调用的c文件名为test.c,文件里有我们需要的函数func(x,y). 将.c文件编译成 .so文 ...