org.kuali.common.util.xml.spring
Class Log4JXmlServiceConfig
java.lang.Object
org.kuali.common.util.xml.spring.Log4JXmlServiceConfig
@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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Log4JXmlServiceConfig
public Log4JXmlServiceConfig()
xmlService
@Bean
public XmlService xmlService()
Copyright © 2010-2013 The Kuali Foundation. All Rights Reserved.