因默认包扫描问题导致的SpringBoot项目无法启动问题
启动SpringBoot项目的时候,提示如下信息:
-- ::22.255 INFO --- [ main] s.c.a.AnnotationConfigApplicationContext :
Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@4e3958e7:
startup date [Mon Aug :: CST ]; root of context hierarchy
-- ::22.817 INFO --- [ main] f.a.AutowiredAnnotationBeanPostProcessor :
JSR- 'javax.inject.Inject' annotation found and supported for autowiring
-- ::22.864 INFO --- [ main] trationDelegate$BeanPostProcessorChecker :
Bean 'configurationPropertiesRebinderAutoConfiguration' of type
[class org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$105a6ef0]
is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) . ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.2.RELEASE) -- ::23.551 INFO --- [ main] EurekaServerMasterApplication :
No active profile set, falling back to default profiles: default
-- ::23.567 INFO --- [ main] ationConfigEmbeddedWebApplicationContext :
Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@12c7a01b:
startup date [Mon Aug :: CST ];
parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@4e3958e7
-- ::23.582 WARN --- [ main] ionWarningsApplicationContextInitializer : ** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.
解决办法:
把main方法所在的类放到一个自定义的包路径下,而不能直接放在mian/java路径下。
下面是错误的位置:
下面是正确的位置:
如果本文对您有所帮助,请扫描下方微信二维码打赏,您的鼓励是我前进最大的鼓励!
因默认包扫描问题导致的SpringBoot项目无法启动问题的更多相关文章
- SpringBoot项目快速启动停止脚本
SpringBoot项目快速启动停止脚本 1.在jar包同级目录下,创建 app.sh #!/bin/bash appName=`ls|grep .jar$` if [ -z $appName ] t ...
- springboot项目突然启动缓慢
在项目快到最后的时候,有一次在本地启动项目的时候,突然发现项目启动起来特别的慢. 刚开始也不知道哪里出了问题,只能慢慢的查原因. springboot项目在debug模式下本来运行的挺快,后来某一天突 ...
- SpringBoot项目jar启动端口设置
SpringBoot项目打包后,在target下生成的jar文件可以使用 Java - jar 直接启动,指定端口号配置 java -jar epjs-eureka.jar --server.port ...
- SpringBoot -- 项目结构+启动流程
一.简述: 项目结构 二.简述:启动流程 说springboot的启动流程,当然少不了springboot启动入口类 @SpringBootApplication public class Sprin ...
- eclipse中创建的spring-boot项目在启动时指定加载那一个配置文件的设置
步骤如下:鼠标点击项目右键—>Run As—>Run Configurations—>Java Application (如下图) 鼠标右键点击Java Application——— ...
- springboot项目简单启动脚本
#!/bin/bash function log_info () { DATE=`date "+%Y-%m-%d %H:%M:%S"` USER=$(whoami) echo &q ...
- IDEA导入springboot项目不能启动
由于工具没有识别到项目的pom.xml文件,所以需要在右侧的Maven栏目中点击 + 号,选中项目的pom.xml文件,则导入成功.
- 【排错】springboot项目,启动报An attempt was made to call the method com.google.gson.GsonBuilder.setLenient()Lcom/google/gson/GsonBuilder; but it does not exist.
pom文件新引入: <dependency> <groupId>com.google.code.gson</groupId> ...
- SpringBoot包扫描之多模块多包名扫描和同类名扫描冲突解决
前言 我们在开发springboot项目时候,创建好SpringBoot项目就可以通过启动类直间启动,运行一个web项目,非常方便简单,不像我们之前通过Spring+SpringMvc要运行启动一个w ...
随机推荐
- shell脚本启动node服务
#!/bin/bash cd /root/dev-web source /etc/profile /usr/local/node-8.11.1/bin/npm i && EGG_SER ...
- easyui的日期控件
1.日期控件只能点击控件进行选择, 不可手动编辑input框中的日期内容 editable="false" 2.日期控件既不可点击, 也不可手动编辑input框中的日期内容 dis ...
- JavaScript Boolean Object 逻辑
Create a Boolean Object The Boolean object represents two values: "true" or "false&qu ...
- ipsec协议(转)
from:http://lulu1101.blog.51cto.com/4455468/816875 ipsec协议 2012-03-25 23:40:28 标签:休闲 ipsec协议 职场 IPSe ...
- 【转】expect语言学习笔记
上周mentor要求我写一个unix shell 脚本, 以便半夜让服务器自动编译image. 其实我觉得每天我走的时候让服务器编译不也挺好的么... 我懒,假装没听见好不容易赖过去了. ...
- NBUT [1475] Bachelor
[1475] Bachelor http://acm.nbut.cn:8081/Problem/view.xhtml?id=1475 时间限制: 1000 ms 内存限制: 65535 K 问题描述 ...
- openstack nova 深入
一.概述: 由nova --debug list查看到: #nova --debug list DEBUG (session:195) REQ: curl -g -i -X GET http://19 ...
- 转载:windiws server 2008R2 IIS7.5 设置win7 IIS7设置,文件夹权限配置,Authenticated Users,支持asp temp
第一步,进入控制面板,点击程序图标 第二步,点击打开或关闭Windows功能 第三步,勾选Internet信息服务全部功能,或根据需要,点击确定,安装 第四步,进入控制面板,点击管理工具 第五步,点击 ...
- 【java】详解集合
目录结构: contents structure [-] 集合概述 什么是集合 Collection和Map的区别 List和Set的区别 ArrayList和LinkedList的区别 HashSe ...
- 模拟器集成3DTouch-b
本文主要讲解3DTouch各种场景下的集成,开发主屏幕应用icon上的快捷选项标签(Home Screen Quick Actions),静态设置 UIApplicationShortcutItem ...