Your ApplicationContext is unlikely to start due to a @ComponentScan of the default
问题:** 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的更多相关文章
- 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 ...
- 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 ...
- ** 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 ...
- 解决错误: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这 ...
- 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.. ...
- springboot之HelloWorld
简介 为了简化开发Spring的复杂度,Spring提供了SpringBoot可以快速开发一个应用,这里就简单介绍下SpringBoot如何快速开发一个J2EE应用 HelloWorld 首先在gra ...
- Spring Boot踩坑之路一
Takes an opinionated view of building production-ready Spring applications. Spring Boot favors conve ...
- SpringBoot的HelloWorld 应用及解释
参考链接: Spring Data JPA - Reference Documentation Spring Data JPA--参考文档 中文版 纯洁的微笑:http://www.ityouknow ...
- springboot 启动报错
有一个警告 :** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the d ...
随机推荐
- JSP 动作
动作是第三种类型的语法元素,它们被转换成Java 代码来执行操作,如访问一个Java对象或调用方法. 一. useBean useBean将创建一个关联Java对象的脚本变量.这 是早期分离的表示层和 ...
- Eclipse编写ExtJS5卡死问题
本篇以eclipse为例,导入后在编译时很容易出现eclipse的卡死现象,这主要是js文件的校验引起的. 我们可通过如下方法进行配置: 打开该项目的.project文件,删除如下配置即可: < ...
- 20165323《Java程序设计》第九周学习总结
一.教材内容学习总结 URL类 1.URL 类是 java.net 包中的一个重要的类,使用 URL 创建对象的应用程序称为客户端程序. 2.一个 URL 对象通常包含最基本的三部分信息:协议.地址和 ...
- linux服务器性能——CPU、内存、流量、磁盘使用率的监控
https://blog.csdn.net/u012859748/article/details/72731080
- Not running in a hosted service or the Development Fabric
今天尝试在azure上发布网站后,无法正常访问 本地调试也提示: Not running in a hosted service or the Development Fabric 谷歌百度半天… 最 ...
- [转] Mongoose初使用总结
连接mongoose mongoose连接数据库有两种方式 第一种: 'use strict'; const mongoose = require('mongoose'); mongoose.conn ...
- __attribute__ ((default)) 和 __attribute__ ((hidden))
制作一个共享库 /* a.h */ int func(); /* a.c */ #include <stdio.h> #include "a.h" int func() ...
- Zookeeper(一)CentOS7.5搭建Zookeeper3.4.12集群与命令行操作
一. 分布式安装部署 1.0 下载地址 官网首页: https://zookeeper.apache.org/ 下载地址: http://mirror.bit.edu.cn/apache/zookee ...
- alpha冲刺3/10
目录 摘要 团队部分 个人部分 摘要 队名:小白吃 组长博客:hjj 作业博客:冲刺3 团队部分 后敬甲(组长) 过去两天完成了哪些任务 文字描述 组织第一次团队编程 继续阅读小程序开发文档 接下来的 ...
- python全栈开发day99-DRF序列化组件
1.解释器组件源码分析 https://www.processon.com/view/link/5ba0a8e7e4b0534c9be0c968 2.基于CBV的接口设计 1).django循环que ...