How to disable accessExternalDTD and entityExpansionLimit warnings with logback

后端 未结 4 768
迷失自我
迷失自我 2021-01-31 17:03

I\'m using logback with groovy and get lots of warnings showing up when parsing xml. I am aware of the bug in JDK1.7_u45 that is causing this.

Warning:  org.apa         


        
4条回答
  •  隐瞒了意图╮
    2021-01-31 17:45

    I also had this error in a project. As I understand it, newer versions of the JRE have the Xerces implementation built into it. More importantly, the JRE version properly supports the accessExternalDTD and entityExpansionLimit properties.

    Because I had a downstream dependency that was including xercesImpl.jar in my war file, my solution was to just yank it using the code below in my build.gradle and let the JRE implementation of xerces take over in the class path.

    warApplication {
        from '/WEB-INF/lib'
            exclude 'xercesImpl*.jar'
    }
    

提交回复
热议问题