Springboot启动无反应。
问题所在,没有配置日志文件的位置,(因为使用的是自定义的日志文件名字)在application.yml中,并且也没有排除springboot中的logging包,所以导致启动无反应
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
解决方案:
application.yml文件中配置日志文件位置
#完全掌控日志配置,但又不想用logback.xml作为Logback配置的名字,可以通过logging.config属性指定自定义的名字
logging.config: classpath:logback-spring.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
以上配置即可。