当前位置: 首页 > 编程笔记 >

解决springboot yml配置 logging.level 报错问题

孙书
2023-03-14
本文向大家介绍解决springboot html" target="_blank">yml配置 logging.level 报错问题,包括了解决springboot yml配置 logging.level 报错问题的使用技巧和注意事项,需要的朋友参考一下

如下所示:

logging:
 config: classpath:spring-logback.xml
 pattern:
 console: "%d - %msg%n"
 level: info

直接写 level: info 会报错:

org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'logging.level' to java.util.Map<java.lang.String, java.lang.String>
...
Caused by: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [java.util.Map<java.lang.String, java.lang.String>]
...

解决方法 :加个root

logging:
 config: classpath:spring-logback.xml
 pattern:
 console: "%d - %msg%n"
 level: 
 root: info

运行成功

以上这篇解决springboot yml配置 logging.level 报错问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持小牛知识库。

 类似资料:
  • 本文向大家介绍解决mybatis case when 报错的问题,包括了解决mybatis case when 报错的问题的使用技巧和注意事项,需要的朋友参考一下 在mybatis中使用case when进行条件筛选判断时遇到 Failed to process, please exclude the tableName or statementId. 这样的报错信息,报错的信息是语法错误 但是我

  • 本文向大家介绍解决Python安装cryptography报错问题,包括了解决Python安装cryptography报错问题的使用技巧和注意事项,需要的朋友参考一下 错误一: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -DHAVE_

  • 本文向大家介绍解决virtualenv -p python3 venv报错的问题,包括了解决virtualenv -p python3 venv报错的问题的使用技巧和注意事项,需要的朋友参考一下 在阿里云服务器上,用virtualenv创建虚拟环境时,报了个错误 看到HTTPError: 404 Client Error: Not Found for url: http://mirrors.ali

  • 本文向大家介绍解决启动Azkaban报错问题:java.lang.NoSuchMethodError: com.google.common.collect.ImmutableMap.toImmutableMap,包括了解决启动Azkaban报错问题:java.lang.NoSuchMethodError: com.google.common.collect.ImmutableMap.toImmut

  • 本文向大家介绍解决无法配置SQL2005问题,包括了解决无法配置SQL2005问题的使用技巧和注意事项,需要的朋友参考一下 问题:点击“SQL Server Configuration Manager”却显示“无法连接到WMI 提供程序 请注意,你只能使用SQL Server 配置管理器来管理SQL Server 2005服务器。找不到指定的模块。[0x8007007e]” 解决方法: 1、到sy

  • 本文向大家介绍解决laravel5.4下的group by报错的问题,包括了解决laravel5.4下的group by报错的问题的使用技巧和注意事项,需要的朋友参考一下 使用ORM查询数据显示这个错,这是因为laravel使用了开启了mysql的严格模式所以 如果要关闭的话,我们需要找到config/database.php这个文件,然后将 mysql下的这个改为false;就会关闭。 既然说严