Xml篇.如何解决Xml文件中的警告提示“No grammar constraints (DTD or XML Schema) referenced in the document.”

曹疏珂
2023-12-01

解决方法:加上 <!DOCTYPE xml>

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE xml>
<configuration>
    <!--输出格式-->
    <appender name="consoleLog" class="ch.qos.logback.core.ConsoleAppender">
    	<!--过滤掉所有低于WARN级别的日志-->
    	<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
            <level>WARN</level>   
        </filter>
        <layout class="ch.qos.logback.classic.PatternLayout">
            <pattern>
                [%d{MM-dd HH:mm:ss.SSS}] %-5level %logger{15} - %msg%n
            </pattern>
        </layout>
    </appender>
    <root level="DEBUG">
        <appender-ref ref = "consoleLog"/>
    </root>
</configuration>
 类似资料: