本文整理了Java中org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException.getCause()
方法的一些代码示例,展示了XmlBeanDefinitionStoreException.getCause()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlBeanDefinitionStoreException.getCause()
方法的具体详情如下:
包路径:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
类名称:XmlBeanDefinitionStoreException
方法名:getCause
暂无
代码示例来源: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: 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: 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: 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: 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());
}
}
代码示例来源:origin: spring-projects/spring-integration
@Test
public void chainRouter() throws Exception {
try {
this.bootStrap("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:router'.", e.getCause().getMessage());
}
}
代码示例来源:origin: apache/servicemix-bundles
/**
* 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;
}
内容来源于网络,如有侵权,请联系作者删除!