问题:** 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. PHP实现动态获取函数参数的方法

    1. func_num_args — 返回传入函数的参数总个数 int func_num_args ( void ) 示例 <?php function demo () { $numargs = ...

  2. Shiro+Redis实现tomcat集群session共享

      一.背景 当我们使用了nginx做项目集群以后,就会出现一个很严重的问题亟待解决,那就是:tomcat集群之间如何实现session共享的问题,如果这个问题不解决,就会出现登陆过后再次请求资源依旧 ...

  3. Android定位元素与操作

    一.常用识别元素的工具 uiautomator:Android SDK自带的一个工具,在tools目录下 monitor:Android SDK自带的一个工具,在tools目录下 Appium Ins ...

  4. js instanceof 检测某个对象是否是另一个对象的实例

    例如File对象 $("#file").change(function(){ console.log($(this)[0].files[0]) console.log($(this ...

  5. youtube-dl更新出错解决办法

    youtube-dl更新命令: youtube-dl -U 更新报错:无法识别当前版本 ERROR: can't find the current version. Please try again ...

  6. Two Sum【LeetCode】

    Given an array of integers, return indices of the two numbers such that they add up to a specific ta ...

  7. 如果拷贝项目出现各种找不到文件的时候,基本就是没有标记,或者文件名的问题,Could not find resource mybatis.xml,解决方法

    Could not find resource mybatis.xml

  8. # 20165206 2017-2018-2 《Java程序设计》第4周学习总结

    20165206 2017-2018-2 <Java程序设计>第4周学习总结 教材学习内容总结 继承:继承是一种由已有的类创建新类的机制. 子类和父类:由继承得到的类称为子类,被继承的类称 ...

  9. python字符串之join

    函数:string.join() Python中有join()和os.path.join()两个函数,具体作用如下: join():连接字符串数组.将字符串.元组.列表中的元素以指定的字符(分隔符)连 ...

  10. vi/vim键盘对应图

    来源:http://www.runoob.com/linux/linux-vim.html