启动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. java节假日api--关于节假日想到的

    http://goseek.cn/index.php. 跟一园友讨论节假日问题得之一网址...涨姿势...(仅限中国节假日) http://api.goseek.cn/ 另一网友整理了测试类: htt ...

  2. LUA可变长参数 ... 三个点

    本文翻译自 LUA官方文档 When a function is called, the list of arguments is adjusted to the length of the list ...

  3. JavaScript 浏览器对象模型 (BOM)

    浏览器对象模型 (BOM) 使 JavaScript 有能力与浏览器“对话”. 浏览器对象模型 (BOM) 浏览器对象模型(Browser Object Model)尚无正式标准. 由于现代浏览器已经 ...

  4. [Spring学习笔记 6 ] Spring JDBC 详解

    项目使用maven管理,pom.xml和项目组织如下: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xs ...

  5. 【C++】自定义比较函数小结

    1.使用结构体grid作为map的key struct grid { int x; int y; }; (1)需要自定义比较函数operator<,不然会报错: error C2784: “bo ...

  6. 【LeetCode】4. Median of Two Sorted Arrays (2 solutions)

    Median of Two Sorted Arrays There are two sorted arrays A and B of size m and n respectively. Find t ...

  7. 百度地图 ijintui以及七牛、百度编辑器、kindeditor

    密码是明文存储的 sig错误是因为params没拼接上md5后的秘钥,测试时候可以在 Api\Controller\CommonController\_initialize 方法里注释掉效验的代码 代 ...

  8. 【MySQL】MySQL解析用户权限管理

    一.MySQL权限简介 关于mysql的权限简单的理解就是mysql允许你做你全力以内的事情,不可以越界.比如只允许你执行select操作,那么你就不能执行update操作.只允许你从某台机器上连接m ...

  9. JavaScript三种方式改变标签css

    原文地址:https://www.cnblogs.com/xiangru0921/p/6514225.html <body> <div id="div">这 ...

  10. SQL表之间复制数据、选出随机几条数据、删除重复数据、取得自增长列等操作

    --表之间数据复制 SELECT* INTO yozhu FROM yo --复制一份表 SELECT* INTO yozhu1 FROM yo where 1<>1 --只复制表结构,无 ...