本文整理了Java中org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
类的一些代码示例,展示了XmlBeanDefinitionStoreException
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlBeanDefinitionStoreException
类的具体详情如下:
包路径:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
类名称:XmlBeanDefinitionStoreException
[英]XML-specific BeanDefinitionStoreException subclass that wraps a org.xml.sax.SAXException, typically a org.xml.sax.SAXParseExceptionwhich contains information about the error location.
[中]包装组织的特定于XML的BeanDefinitionStoreException子类。xml。萨克斯。SAXException,通常是一个组织。xml。萨克斯。SAXParseException包含有关错误位置的信息。
代码示例来源:origin: spring-projects/spring-framework
/**
* Return the line number in the XML resource that failed.
* @return the line number if available (in case of a SAXParseException); -1 else
* @see org.xml.sax.SAXParseException#getLineNumber()
*/
public int getLineNumber() {
Throwable cause = getCause();
if (cause instanceof SAXParseException) {
return ((SAXParseException) cause).getLineNumber();
}
return -1;
}
代码示例来源:origin: spring-projects/spring-framework
throw new XmlBeanDefinitionStoreException(resource.getDescription(),
"Line " + ex.getLineNumber() + " in XML document from " + resource + " is invalid", ex);
throw new XmlBeanDefinitionStoreException(resource.getDescription(),
"XML document from " + resource + " is invalid", ex);
代码示例来源:origin: org.springframework/spring-beans
/**
* Return the line number in the XML resource that failed.
* @return the line number if available (in case of a SAXParseException); -1 else
* @see org.xml.sax.SAXParseException#getLineNumber()
*/
public int getLineNumber() {
Throwable cause = getCause();
if (cause instanceof SAXParseException) {
return ((SAXParseException) cause).getLineNumber();
}
return -1;
}
代码示例来源:origin: org.springframework/spring-beans
throw new XmlBeanDefinitionStoreException(resource.getDescription(),
"Line " + ex.getLineNumber() + " in XML document from " + resource + " is invalid", ex);
throw new XmlBeanDefinitionStoreException(resource.getDescription(),
"XML document from " + resource + " is invalid", ex);
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Return the line number in the XML resource that failed.
* @return the line number if available (in case of a SAXParseException); -1 else
* @see org.xml.sax.SAXParseException#getLineNumber()
*/
public int getLineNumber() {
Throwable cause = getCause();
if (cause instanceof SAXParseException) {
return ((SAXParseException) cause).getLineNumber();
}
return -1;
}
代码示例来源:origin: camunda/camunda-bpm-platform
throw new XmlBeanDefinitionStoreException(resource.getDescription(),
"Line " + ex.getLineNumber() + " in XML document from " + resource + " is invalid", ex);
throw new XmlBeanDefinitionStoreException(resource.getDescription(),
"XML document from " + resource + " is invalid", ex);
代码示例来源:origin: spring-projects/spring-integration
@Test
public void chainHeaderValueRouter() throws Exception {
try {
this.bootStrap("header-value-router");
fail("Expected a XmlBeanDefinitionStoreException to be thrown.");
}
catch (XmlBeanDefinitionStoreException e) {
assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" +
" allowed to appear in element 'int:header-value-router'.", e.getCause().getMessage());
}
}
代码示例来源:origin: apache/servicemix-bundles
throw new XmlBeanDefinitionStoreException(resource.getDescription(),
"Line " + ex.getLineNumber() + " in XML document from " + resource + " is invalid", ex);
throw new XmlBeanDefinitionStoreException(resource.getDescription(),
"XML document from " + resource + " is invalid", ex);
代码示例来源:origin: spring-projects/spring-integration
@Test
public void chainAggregator() throws Exception {
try {
this.bootStrap("aggregator");
fail("Expected a XmlBeanDefinitionStoreException to be thrown.");
}
catch (XmlBeanDefinitionStoreException e) {
assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" +
" allowed to appear in element 'int:aggregator'.", e.getCause().getMessage());
}
}
代码示例来源:origin: spring-projects/spring-integration
@Test
public void chainHeaderFilter() throws Exception {
try {
this.bootStrap("header-filter");
fail("Expected a XmlBeanDefinitionStoreException to be thrown.");
}
catch (XmlBeanDefinitionStoreException e) {
assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" +
" allowed to appear in element 'int:header-filter'.", e.getCause().getMessage());
}
}
代码示例来源:origin: spring-projects/spring-integration
@Test
public void chainTransformer() throws Exception {
try {
this.bootStrap("transformer");
fail("Expected a XmlBeanDefinitionStoreException to be thrown.");
}
catch (XmlBeanDefinitionStoreException e) {
assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" +
" allowed to appear in element 'int:transformer'.", e.getCause().getMessage());
}
}
代码示例来源:origin: spring-projects/spring-integration
@Test
public void chainServiceActivator() throws Exception {
try {
this.bootStrap("service-activator");
fail("Expected a XmlBeanDefinitionStoreException to be thrown.");
}
catch (XmlBeanDefinitionStoreException e) {
assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" +
" allowed to appear in element 'int:service-activator'.", e.getCause().getMessage());
}
}
代码示例来源:origin: spring-projects/spring-integration
@Test
public void chainDelayer() throws Exception {
try {
this.bootStrap("delayer");
fail("Expected a XmlBeanDefinitionStoreException to be thrown.");
}
catch (XmlBeanDefinitionStoreException e) {
assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" +
" allowed to appear in element 'int:delayer'.", e.getCause().getMessage());
}
}
代码示例来源:origin: spring-projects/spring-integration
@Test
public void chainHeaderEnricher() throws Exception {
try {
this.bootStrap("header-enricher");
fail("Expected a XmlBeanDefinitionStoreException to be thrown.");
}
catch (XmlBeanDefinitionStoreException e) {
assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" +
" allowed to appear in element 'int:header-enricher'.", e.getCause().getMessage());
}
}
代码示例来源:origin: spring-projects/spring-integration
@Test
public void chainOutboundGatewayWithInputChannel() throws Exception {
try {
bootStrap("file-outbound-gateway-input-channel");
fail("Expected a XmlBeanDefinitionStoreException to be thrown.");
}
catch (XmlBeanDefinitionStoreException e) {
assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" +
" allowed to appear in element 'int-file:outbound-gateway'.", e.getCause().getMessage());
}
}
代码示例来源:origin: spring-projects/spring-integration
@Test
public void chainGateway() throws Exception {
try {
this.bootStrap("gateway");
fail("Expected a XmlBeanDefinitionStoreException to be thrown.");
}
catch (XmlBeanDefinitionStoreException e) {
assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" +
" allowed to appear in element 'int:gateway'.", e.getCause().getMessage());
}
}
代码示例来源:origin: spring-projects/spring-integration
@Test
public void chainSplitter() throws Exception {
try {
this.bootStrap("splitter");
fail("Expected a XmlBeanDefinitionStoreException to be thrown.");
}
catch (XmlBeanDefinitionStoreException e) {
assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" +
" allowed to appear in element 'int:splitter'.", e.getCause().getMessage());
}
}
代码示例来源:origin: spring-projects/spring-integration
@Test
public void chainResequencer() throws Exception {
try {
this.bootStrap("resequencer");
fail("Expected a XmlBeanDefinitionStoreException to be thrown.");
}
catch (XmlBeanDefinitionStoreException e) {
assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" +
" allowed to appear in element 'int:resequencer'.", e.getCause().getMessage());
}
}
代码示例来源:origin: spring-projects/spring-integration
@Test
public void chainChain() throws Exception {
try {
this.bootStrap("chain");
fail("Expected a XmlBeanDefinitionStoreException to be thrown.");
}
catch (XmlBeanDefinitionStoreException e) {
assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" +
" allowed to appear in element 'int:chain'.", e.getCause().getMessage());
}
}
代码示例来源:origin: spring-projects/spring-integration
@Test
public void chainFilter() throws Exception {
try {
this.bootStrap("filter");
fail("Expected a XmlBeanDefinitionStoreException to be thrown.");
}
catch (XmlBeanDefinitionStoreException e) {
assertEquals("cvc-complex-type.3.2.2: Attribute 'input-channel' is not" +
" allowed to appear in element 'int:filter'.", e.getCause().getMessage());
}
}
内容来源于网络,如有侵权,请联系作者删除!