问题:** 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. follow

    public function follow(Request $request, FeedModel $model, FeedRepository $repository) { if (is_null ...

  2. AI学习吧-登录注册

    登录注册注销 如果需要给表设置权限,没有登录就不可以查看,只需要在每个视图函数之前加上Auth_classes=[ ]即可! 增加两张表,做登录认证 #models.py #做登录验证 class U ...

  3. HTML5 CSS3 Transform 笔记 (scale不起作用)

    Transform的 scale属性不能作用于 inline元素上,例如span 并且动画 animation  也不能作用于inline元素上 可以给span加display:inline-bloc ...

  4. 论文阅读笔记三十七:Grid R-CNN(CVPR2018)

    论文源址:https://arxiv.org/abs/1811.12030 开源代码:未公开 摘要 本文提出了目标检测网络Grid R-CNN,其基于网格定位机制实现准确的目标检测.传统方法主要基于回 ...

  5. Nlog日志之File

    一:简介 NLog是一个简单灵活的.NET日志记录类库.通过使用NLog,我们可以在任何一种.NET语言中输出带有上下文的(contextual information)调试诊断信息,根据喜好配置其表 ...

  6. Java连接MySQL数据库三种方法

    好久没有更新博客了!今天利用周目时学习了一下数据库mysql.介绍一下数据库的三种连接方式! 开发工具:Myeclipse MySQL5.6 MySQL连接驱动:mysql-connector-jav ...

  7. JavaScript 匿名函数

    转载自:https://www.cnblogs.com/ClareZjy/p/6365891.html   零:介绍 匿名函数的基本形式为(function(){...})(); 前面的括号包含函数体 ...

  8. curl请求https请求

    function curl_https($url,$data){ $ch = curl_init (); curl_setopt ( $ch, CURLOPT_URL, $url ); curl_se ...

  9. [转]搭建Hadoop伪分布式环境

    https://my.oschina.net/MyHeaven1987/blog/1821509 http://hadoop.apache.org/docs/current/hadoop-projec ...

  10. twitter typeahead控件使用经历

    typeahead控件可以用于自动完成这个功能,在jQuery的UI中也有自动完成的控件.以前都是用jQuery UI中的自动完成的控件,但这次想用个轻量级的自动完成的控件,因此就调查了一下typeh ...