问题:** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.

翻译:警告:你的应用上下文可能没有启动,因为你将注解添加到了默认的package上面了。下面的堆栈信息中也有一句话包括了这个意思。

解决:(结合下图)

方法一:@SpringBootApplication(scanBasePackages = {"com.example"}),注解后面加上要扫描的包(当文件在java下时)

方法二(推荐):把启动项放到com.example包下,不需要加扫描包路径

@SpringBootApplication
public class YyshopApplication { public static void main(String[] args) {
SpringApplication.run(YyshopApplication.class, args);
} }

Your ApplicationContext is unlikely to start due to a @ComponentScan of the default的更多相关文章

  1. Java问题解决:springboot启动出现-Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package

    参考资料: http://www.mamicode.com/info-detail-2101273.html https://blog.csdn.net/u012834750/article/deta ...

  2. Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package

    1.在搭建SpringBoot框架时碰到的问题. ** WARNING ** : Your ApplicationContext is unlikely to start due to a @Comp ...

  3. ** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.

    https://blog.csdn.net/qq_15071263/article/details/78459087 1. 警告解读 ** WARNING ** : Your ApplicationC ...

  4. 解决错误:Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.

    原因是代码直接放在默认包里边,比如src\main\java目录下 应该在src\main\java下建立子目录,比如src\main\java\com\test 这样的话,代码就在com.test这 ...

  5. Your ApplicationContext is unlikely tostart due to a @ComponentScan of the defau

    一.错误提示: Your ApplicationContext is unlikely tostart due to a @ComponentScan of the default package.. ...

  6. springboot之HelloWorld

    简介 为了简化开发Spring的复杂度,Spring提供了SpringBoot可以快速开发一个应用,这里就简单介绍下SpringBoot如何快速开发一个J2EE应用 HelloWorld 首先在gra ...

  7. Spring Boot踩坑之路一

    Takes an opinionated view of building production-ready Spring applications. Spring Boot favors conve ...

  8. SpringBoot的HelloWorld 应用及解释

    参考链接: Spring Data JPA - Reference Documentation Spring Data JPA--参考文档 中文版 纯洁的微笑:http://www.ityouknow ...

  9. springboot 启动报错

    有一个警告 :** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the d ...

随机推荐

  1. 小学生都看得懂的C语言入门(2): 判别 循环的一些应用实例

    1.bool 类型 定义bool类型之前需要导入#include <stdbool.h> #include <stdio.h> #include <stdbool.h&g ...

  2. 什么是 TCP 拆、粘包?如何解决(Netty)

    前言 记得前段时间我们生产上的一个网关出现了故障. 这个网关逻辑非常简单,就是接收客户端的请求然后解析报文最后发送短信. 但这个请求并不是常见的 HTTP ,而是利用 Netty 自定义的协议. 有个 ...

  3. C++ Primer 笔记——理解std::move

    标准库move函数是使用右值引用的模板的一个很好的例子.标准库是这样定义std::move的: template <typename T> typename remove_referenc ...

  4. ORA-12519 ORA-12516

    目录: 错误信息 原因分析 解决方法 1. 错误信息 [oracle@test1 admin]$ oerr ora , , "TNS:no appropriate service handl ...

  5. 20165323 2017-2018-2 《Java程序设计》课程总结

    一.每周作业链接汇总 预备作业1:20165323 我期望的师生关系 预备作业2:20165323 学习基础与C语言学习心得 预备作业3:20165323 预备作业三 第一周作业:20165323&l ...

  6. Angularjs 学习笔记-2017-02-05-初识Angular及app、model、controller、repeat指令和fileter、orderBy

    ng-app   定义作用域,从作用域处开始执行ng命令指令 ng-model 数据绑定字符,用于双向数据绑定 ng-controller ng控制台,定义function name($scope)来 ...

  7. raspberry pi恢复jessie镜像之后

    1.更新源 nano /etc/apt/source.list deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib ...

  8. linux shell基本知识

    shell script的一些注意事项: .#这个符号是注释本行,通常用来做批注用,#!除外,是用来标注用哪种shell执行本脚本, .执行顺序为从上到下,从做到右 .忽略空行,tab空格 .脚本换行 ...

  9. 【Arduino】开源开发板说明

    来自世界各地的新型微控制器层出不穷,这类开发板多数都是通过Arduino改进的版本,例如由Arduino所改良的Yún一样,主要是针对网状网路进行改进或升级了其它无线功能. 但一些开发板也有着其独到的 ...

  10. Python_二维数组

    例1:将数组旋转90度 a = [[i for i in range(4)] for n in range(4)] print(a) # 遍历大序列 for a_index, w in enumera ...