我正在嘗試遵循Springboot logback 自定義說明。我想基本上獲得默認(rèn)行為(這樣我就可以添加它)。該頁面說: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] 對(duì)應(yīng)的資源我的 build.gradle 中有很多:dependencies {? ? implementation(? ? ? ? ? ? 'org.springframework.boot:spring-boot-starter-web',? ? ? ? ? ? 'org.springframework.boot:spring-boot-starter-logging',...理論上我認(rèn)為 starter-web 本身就足夠了?我缺少什么?
1 回答

holdtom
TA貢獻(xiàn)1805條經(jīng)驗(yàn) 獲得超10個(gè)贊
似乎是文檔中的拼寫錯(cuò)誤。
該文件存在于spring-boot-X.X.X.jar
文件中,但其名稱為defaults.xml
,而不是default.xml
。
添加回答
舉報(bào)
0/150
提交
取消