网络编程
位置:首页>> 网络编程>> Python编程>> 解决springboot yml配置 logging.level 报错问题

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

作者:iyiio  发布时间:2021-09-21 21:38:02 

标签: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

运行成功

来源:https://blog.csdn.net/qq_43581949/article/details/90692163

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com