springboot启动时控制台不显示映射的URL

背景

今天,第一次使用 2.2.0 版本的springboot,在访问接口时发现访问不到,于是在控制台进行 URL 搜索,发现并相关没有内容

原因

springboot版本差异,切换回 2.0.5.RELEASE ,启动项目,发现控制台又正常打印API了

解决方法

2.2.0 版本中,配置文件中更改 org.springframework.web 包的日志级别:

logging:
  level:
    org.springframework.web: TRACE

启动项目,查看控制台打印:

总结

Spring Boot 2.1 开始,使用了 Spring Framework 5.1, 而 Spring Framework 5.1 对日志做了较大的改动。
现在使用 INFO 级别记录的信息非常少,DEBUG 级别提供了更多信息,但不详细。
只有 TRACE 级别才会提供详细信息。
SpringBoot 的 Wiki:

Spring Framework 5.1 revisited the debug logging output while working on web applications (Spring MVC or Spring WebFlux). If you are trying to debug an application and you want to restore Spring Boot 2.0 style logging you should add the following to your application.properties:
...

如果觉得对你有用,请点个 推荐 吧!

原文地址:https://www.cnblogs.com/zhuang229/p/11757437.html

时间: 2024-07-31 05:20:58

springboot启动时控制台不显示映射的URL的相关文章

Springboot 启动时Bean初始化,启动异常-Assert.isTrue(condition,message) 报错

Springboot 启动时Bean初始化启动异常Assert.isTrue(condition,message) 报错,如果 condition为false 则会出现 java.lang.IllegalArgumentException: message, org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'XXXXXX' defined in class path re

【问题解决:信息提示】SpringBoot启动时提示The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path

问题描述 springboot程序在启动时提示信息 [2018-10-24 21:59:05.214] - 440 信息 [restartedMain] --- org.apache.catalina.core.StandardService: Starting service [Tomcat] [2018-10-24 21:59:05.220] - 440 信息 [restartedMain] --- org.apache.catalina.core.StandardEngine: Start

SpringBoot启动时的Banner设置

对于使用过Spring Boot的开发者来说,程序启动的时候输出的由字符组成的Spring符号并不陌生.这个是Spring Boot为自己设计的Banner: 1.    .   ____          _            __ _ _ 2.   /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \ 3.  ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ 4.   \\/  ___)| |_)| | | | | || (_|

springboot启动时的一个bug

项目启动就有这个错 Error creating bean with name 'XXXXXXXX': Cannot create inner bean '(inner bean)#1f930774' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager 这虽然是个警告但是就是起不来 2019-06-16 22:13:58.504 WA

Winform启动时隐藏不显示

我最终用了这个方法:1.MainForm的构造方法中添加: public MainForm() { InitializeComponent(); this.ShowInTaskbar = false; this.Opacity = 0; } 2.MainForm的Shown事件中添加: private void MainForm_Shown(object sender, EventArgs e) { this.Hide(); this.ShowInTaskbar = true; this.Opa

tomcat windows 平台启动时控制台乱码

找到tomcat的配置目录conf 编辑文件添加java.util.logging.ConsoleHandler.encoding = GBK 原文地址:https://blog.51cto.com/13154224/2445555

SpringBoot在启动时的多环境配置以及加载顺序

通常我们在开发完成一个SpringBoot项目时,总是要打包部署的. 在启动SpringBoot应用时,我们常常会使用命令java -jar xxx.jar来启动这个服务. 命令java -jar 除了启动应用之外,还可以在命令中指定应用的参数,比如一下带参数的命令: (1)java -jar xxx.jar --server.port=8081,直接以命令的方式来设置服务的访问端口server.port属性,将端口设置为8081; (2)java -jar -Xms1024m -Xmx1024

idea中启动tomcat控制台中文乱码

在启动tomcat容器时控制台会显示乱码,这个问题属于tomcat编码问题引起的,我们需要在VM options中添加:-Dfile.encoding=UTF-8 如果上述方法仍然无法解决,可以参考https://blog.csdn.net/dandandeshangni/article/details/48544221 原文地址:https://www.cnblogs.com/gudbd/p/9721398.html

springboot启动过程(1)-初始化

1   springboot启动时,只需要调用一个类前面加了@SpringBootApplication的main函数,执行SpringApplication.run(DemoApplication.class, args)即可,这里初始化了一个SpringApplication实例,然后调用run启动springboot.run方法中,调用了initialize,如下 @SuppressWarnings({ "unchecked", "rawtypes" }) p