刚用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相关推荐

  1. 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 ...

  2. SpringBoot整合Mybatis出现的错误:At least one base package must be specified

    错误代码如下: java.lang.IllegalArgumentException: At least one base package must be specified at org.sprin ...

  3. springboot启动错误: 找不到或无法加载主类

    当在eclipse启动spring boot项目时出现问题: springboot错误: 找不到或无法加载主类 解决办法: 1,通过cmd命令行,进入项目目录进行,mvn clean install ...

  4. springboot启动错误 Could not resolve placeholder

    Could not resolve placeholder 'spring.datasource.druid.initialSize' in value "${spring.datasour ...

  5. springboot 两个src_记一次Springboot 启动错误(二)-Go语言中文社区

    解决异常需要用到的文件 2019-1-14 补充: 帮同事安装项目时又遇到这个问题 但是是以另外一种方式呈现: 错误信息: {com.ruoyi.project.platform.message.ma ...

  6. SpringBoot 启动错误搜集

    Spring Boot:The Bean Validation API is on the classpath but no implementation could be found https:/ ...

  7. SpringBoot启动错误 If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.

    需要在pom文件中<build></build中添加如下.来保证文件都能正常被扫描到并且加载成功. <!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉 ...

  8. springboot At least one base package must be specified的解决方式

    springboot启动错误–"springboot At least one base package must be specified" peerless_fu 2018-1 ...

  9. Springboot启动报错:DEBUG org.springframework.boot.diagnostics.FailureAnalyzers

    springboot 启动错误 D:\software\Java\jdk1.8.0_261\bin\java.exe -XX:TieredStopAtLevel=1 -noverify -Dsprin ...

最新文章

  1. STC12C5A60S2 内部AD+1602显示
  2. python基础教程:操作符
  3. ZOJ_3501 Roman Order
  4. CORS 跨域-同源
  5. 安装MariaDB数据库(未完成)
  6. python字符串前面去两位_在Python 3中删除字符串文字前面的'b'字符do
  7. WF4 AttachedPropertiesService
  8. 视频处理简单实例 [OpenCV 笔记2]
  9. 基于知识图谱的问答系统,BERT做命名实体识别和句子相似度
  10. HTML 标签学习总结第一天
  11. 信息系统项目管理师——成本管理
  12. html页面小宠物代码大全,宠物店网页设计html代码
  13. 2021 年 GitHub 上十大最火 Python 项目,看完之后我裂开了
  14. 3dmax2014 uv用法_3ds max uv展开教程
  15. 数据结构学习笔记2:双向链表和静态链表
  16. 更为详细的Txtsetup.sif文件解释
  17. CSS 控制边框样式
  18. 电脑的CPU主频1.8GHZ够不够用
  19. 计算机网络vlan的作用,计算机网络 篇一:一根网线解决IPTV和路由器联网--基于VLAN的IPTV和宽带单线复用解决方案...
  20. CodeForces 757 E.Bash Plays with Functions(积性函数+dp)

热门文章

  1. OpenCV拷贝与ROI
  2. 漫谈并发编程:Actor模型
  3. scala 读取txt文件(从文件读取)
  4. python自动生成ppt报告_把时间还给洞察,且看PPT调研报告自动生成攻略
  5. 最新最全的免费股票数据接口--沪深A股深度分析财务分析数据API接口(十一)
  6. mysql数据库中吧时分秒换算成秒的函数TIME_TO_SEC()
  7. 二十九岁,刚读完了财富启蒙读物《小狗钱钱》
  8. bim翻模教程:如何控制revit中的填充图案和构件显示隐藏
  9. Vue3中setup前写async页面不显示
  10. uni-app 开发微信公众号(H5)JSSDK 的使用方式