@Configuration public class Log4JXmlServiceConfig extends Object
The XML log4j knows how to parse, contains both an element and an attribute that have the colon character in their name. A colon is almost universally used to represent a namespace prefix, but in the XML for log4j, the colon is part of the node name. This config class returns an XML service capable of correctly parsing XML that uses the colon character in attribute and element names.
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> </log4j:configuration>
The technique being used to handle log4j.xml parsing is to leverage a SAX parser that is not namespace aware (and thus treats the colon character just like any other character). This is described in more detail on Blaise Doughan's blog - http://blog.bdoughan.com/2011/05/jaxb-and-dtd.html
Constructor and Description |
---|
Log4JXmlServiceConfig() |
public Log4JXmlServiceConfig()
@Bean public XmlService xmlService()
Copyright © 2010–2014 The Kuali Foundation. All rights reserved.