启动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项目无法启动问题的更多相关文章

  1. SpringBoot项目快速启动停止脚本

    SpringBoot项目快速启动停止脚本 1.在jar包同级目录下,创建 app.sh #!/bin/bash appName=`ls|grep .jar$` if [ -z $appName ] t ...

  2. springboot项目突然启动缓慢

    在项目快到最后的时候,有一次在本地启动项目的时候,突然发现项目启动起来特别的慢. 刚开始也不知道哪里出了问题,只能慢慢的查原因. springboot项目在debug模式下本来运行的挺快,后来某一天突 ...

  3. SpringBoot项目jar启动端口设置

    SpringBoot项目打包后,在target下生成的jar文件可以使用 Java - jar 直接启动,指定端口号配置 java -jar epjs-eureka.jar --server.port ...

  4. SpringBoot -- 项目结构+启动流程

    一.简述: 项目结构 二.简述:启动流程 说springboot的启动流程,当然少不了springboot启动入口类 @SpringBootApplication public class Sprin ...

  5. eclipse中创建的spring-boot项目在启动时指定加载那一个配置文件的设置

    步骤如下:鼠标点击项目右键—>Run As—>Run Configurations—>Java Application (如下图) 鼠标右键点击Java Application——— ...

  6. springboot项目简单启动脚本

    #!/bin/bash function log_info () { DATE=`date "+%Y-%m-%d %H:%M:%S"` USER=$(whoami) echo &q ...

  7. IDEA导入springboot项目不能启动

    由于工具没有识别到项目的pom.xml文件,所以需要在右侧的Maven栏目中点击 + 号,选中项目的pom.xml文件,则导入成功.

  8. 【排错】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>         ...

  9. SpringBoot包扫描之多模块多包名扫描和同类名扫描冲突解决

    前言 我们在开发springboot项目时候,创建好SpringBoot项目就可以通过启动类直间启动,运行一个web项目,非常方便简单,不像我们之前通过Spring+SpringMvc要运行启动一个w ...

随机推荐

  1. 使用 kubectl drain 从集群中移除节点

    对节点执行维护操作之前(例如:内核升级,硬件维护等),您可以使用 kubectl drain 安全驱逐节点上面所有的 pod.安全驱逐的方式将会允许 pod 里面的容器遵循指定的 PodDisrupt ...

  2. (原)linux下caffe模型转tensorflow模型

    转载请注明出处: http://www.cnblogs.com/darkknightzh/p/7419352.html 参考网址: https://github.com/ethereon/caffe- ...

  3. [转载]显示SVN控制台

    原文地址:显示SVN控制台作者:瘦骨临清风  青春就应该这样绽放  游戏测试:三国时期谁是你最好的兄弟!!  你不得不信的星座秘密

  4. mysql之limit m,n

    limit是mysql的语法 select * from table limit [m],n; 其中,m—— [m]为可选,如果填写表示skip步长,即跳过m条. n——显示条数.指从第m+1条记录开 ...

  5. vscode用法

    工欲善其事,必先利其器.vscode是一个值得花费时间去掌握精通的编辑器. 好文档不必远求 打开vscode,把菜单看上三遍,仔细思考每个菜单项的作用,思考为啥要这样归类每个菜单项. 配置是系统的核心 ...

  6. Add Microsoft SQL JDBC driver to Maven(转)

    from:http://claude.betancourt.us/add-microsoft-sql-jdbc-driver-to-maven/ Add Microsoft SQL JDBC driv ...

  7. linux shell 脚本攻略学习18--grep命令详解

    grep(global search regular expression(RE) and print out the line,全面搜索正则表达式并把行打印出来)是unix/linux中用于文本搜索 ...

  8. jenkins+maven+git+ 邮件自动转发 持续化集成 图文教程

    1.所需要的插件,安装plugin ,进入mangae Jenkins→ manage Plugins, 切换到Available tab, 选择如下plugin 安装 Gitplugin, GitH ...

  9. 【MyBatis】MyBatis之分页

    关于MyBatis的搭建可以参见“MyBatis的配置”,MyBatis是对JDBC底层代码的封装,关于Oracle.MySQL.SqlServer的分页可以查看Oracle.SqlServer.My ...

  10. “The operation cannot be completed because the DbContext has been disposed” exception with lazy load disabled

    http://stackoverflow.com/questions/18261732/the-operation-cannot-be-completed-because-the-dbcontext- ...