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"


版权声明:本文为qq_53723478原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。