springboot启动错误--springboot At least one base package must be specified
刚用idea社区版新建一个springboot项目,配置启动类如下:
@SpringBootApplication
@ComponentScan("com.test")
@MapperScan("com.test.mapper")
public class SpringBootStart {public static void main(String[] args){SpringApplication.run(SpringBootStart.class, args);}
}
启动后一直报一个错误:
"springboot At least one base package must be specified"
网上大部分都是说没有配置包的扫描路径等等原因造成的,可是检查了好久启动类配置没有问题。
最后发现原来是启动类放错了位置,这个启动类要放在com.test包下面,而不能直接放到main.java下面。
我一开始直接放在main.java下面,发现了如下错误:
把启动类放到com.test目录下就正常启动了。
springboot启动错误--springboot At least one base package must be specified相关推荐
- springBoot启动错误:Field categoryMapper in xxx.xxx.service.impl.CategoryServiceImpl required a bean of
springBoot启动错误:Field categoryMapper in com.leyou.service.impl.CategoryServiceImpl required a bean of ...
- SpringBoot整合Mybatis出现的错误:At least one base package must be specified
错误代码如下: java.lang.IllegalArgumentException: At least one base package must be specified at org.sprin ...
- springboot启动错误: 找不到或无法加载主类
当在eclipse启动spring boot项目时出现问题: springboot错误: 找不到或无法加载主类 解决办法: 1,通过cmd命令行,进入项目目录进行,mvn clean install ...
- springboot启动错误 Could not resolve placeholder
Could not resolve placeholder 'spring.datasource.druid.initialSize' in value "${spring.datasour ...
- springboot 两个src_记一次Springboot 启动错误(二)-Go语言中文社区
解决异常需要用到的文件 2019-1-14 补充: 帮同事安装项目时又遇到这个问题 但是是以另外一种方式呈现: 错误信息: {com.ruoyi.project.platform.message.ma ...
- SpringBoot 启动错误搜集
Spring Boot:The Bean Validation API is on the classpath but no implementation could be found https:/ ...
- SpringBoot启动错误 If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
需要在pom文件中<build></build中添加如下.来保证文件都能正常被扫描到并且加载成功. <!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉 ...
- springboot At least one base package must be specified的解决方式
springboot启动错误–"springboot At least one base package must be specified" peerless_fu 2018-1 ...
- Springboot启动报错:DEBUG org.springframework.boot.diagnostics.FailureAnalyzers
springboot 启动错误 D:\software\Java\jdk1.8.0_261\bin\java.exe -XX:TieredStopAtLevel=1 -noverify -Dsprin ...
最新文章
- STC12C5A60S2 内部AD+1602显示
- python基础教程:操作符
- ZOJ_3501 Roman Order
- CORS 跨域-同源
- 安装MariaDB数据库(未完成)
- python字符串前面去两位_在Python 3中删除字符串文字前面的'b'字符do
- WF4 AttachedPropertiesService
- 视频处理简单实例 [OpenCV 笔记2]
- 基于知识图谱的问答系统,BERT做命名实体识别和句子相似度
- HTML 标签学习总结第一天
- 信息系统项目管理师——成本管理
- html页面小宠物代码大全,宠物店网页设计html代码
- 2021 年 GitHub 上十大最火 Python 项目,看完之后我裂开了
- 3dmax2014 uv用法_3ds max uv展开教程
- 数据结构学习笔记2:双向链表和静态链表
- 更为详细的Txtsetup.sif文件解释
- CSS 控制边框样式
- 电脑的CPU主频1.8GHZ够不够用
- 计算机网络vlan的作用,计算机网络 篇一:一根网线解决IPTV和路由器联网--基于VLAN的IPTV和宽带单线复用解决方案...
- CodeForces 757 E.Bash Plays with Functions(积性函数+dp)