idea日志问题:application.yml 写debug打印日志报错问题

日志报错,提示:

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

Description:

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

Reason: 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

 

  原因:

  yml文件中的格式不对,冒号后面要空一格再来写属性值

 

正确写法:

logging:         (顶头)
level:         (空两格)
cn.zzlr: debug  ((空两格)键:(空一格)值)


注意:  logging.level(回车键:代码会自动补全的)

logging:
level: debug(这是字符串,所以抛异常)

logging:
level:
  cn.zzlr: debug
 level是map键值对形式
(key:包名)cn.zzlr: debug(值:是级名)
posted @ 2021-12-28 11:54  闻闻家文文  阅读(656)  评论(0编辑  收藏  举报