SpringBoot yml配置文件中,logging.level报错

报错


***************************
APPLICATION FAILED TO START
***************************

Description:

Failed to bind properties under 'logging.level' to java.util.Map<java.lang.String, org.springframework.boot.logging.LogLevel>:

    Property: logging.level
    Value: debug
    Origin: class path resource [application.yml] - 25:10
    Reason: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [java.util.Map<java.lang.String, org.springframework.boot.logging.LogLevel>]

Action:

Update your application's configuration

错误原因

配置文件写错了
在这里插入图片描述

解决

按照官网的案例

logging:
  level:
    root: "warn"
    org.springframework.web: "debug"
    org.hibernate: "error"

posted @ 2022-11-07 19:07  老羊肖恩  阅读(54)  评论(0编辑  收藏  举报