亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何擴展Springboot logback配置?(default.xml 顯然不可用)

如何擴展Springboot logback配置?(default.xml 顯然不可用)

陪伴而非守候 2023-07-19 15:51:21
我正在嘗試遵循Springboot logback 自定義說明。我想基本上獲得默認行為(這樣我就可以添加它)。該頁面說:A typical custom logback.xml file would look something like this:<?xml version="1.0" encoding="UTF-8"?><configuration>? ? <include resource="org/springframework/boot/logging/logback/default.xml"/>? ? <include resource="org/springframework/boot/logging/logback/console-appender.xml" />? ? <root level="INFO">? ? ? ? <appender-ref ref="CONSOLE" />? ? </root>? ? <logger name="org.springframework.web" level="DEBUG"/></configuration>...所以我嘗試了,然后我明白了ch.qos.logback.core.joran.action.IncludeAction 中的警告 - 找不到與 [org/springframework/boot/logging/logback/default.xml] 對應的資源我的 build.gradle 中有很多:dependencies {? ? implementation(? ? ? ? ? ? 'org.springframework.boot:spring-boot-starter-web',? ? ? ? ? ? 'org.springframework.boot:spring-boot-starter-logging',...理論上我認為 starter-web 本身就足夠了?我缺少什么?
查看完整描述

1 回答

?
holdtom

TA貢獻1805條經驗 獲得超10個贊

似乎是文檔中的拼寫錯誤。

該文件存在于spring-boot-X.X.X.jar文件中,但其名稱為defaults.xml,而不是default.xml。

http://img1.sycdn.imooc.com//64b796250001e54d02660637.jpg

查看完整回答
反對 回復 2023-07-19
  • 1 回答
  • 0 關注
  • 118 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號