2013 年 9 月 22 日下午 5:15:00 org.glassfish.jersey.message.internal.SecureSaxParserFactory
WARNING: JAXP feature XMLConstants.FEATURE_SECURE_PROCESSING cannot be set on a SAXParserFactory. External general entity processing is disabled but other potential security related features will not be enabled.
org.xml.sax.SAXNotRecognizedException: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
at org.apache.xerces.parsers.AbstractSAXParser.setFeature(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.setFeatures(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParserImpl(Unknown Source)
at org.apache.xerces.jaxp.SAXParserFactoryImpl.setFeature(Unknown Source)
at org.glassfish.jersey.message.internal.SecureSaxParserFactory.<init>(SecureSaxParserFactory.java:107)...
我可以用
config.getFeatures().put(FeaturesAndProperties.FEATURE_DISABLE_XML_SECURITY, true);
避免在Jersey1.x上出现此警告消息,但是当我迁移到Jersey2.x时,没有此功能设置。我怎么能在 Jersey2.x 上再次避免它?谢谢!