gpt4 book ai didi

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException类的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 13:08:40 27 4
gpt4 key购买 nike

本文整理了Java中org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException类的一些代码示例,展示了XmlBeanDefinitionStoreException类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlBeanDefinitionStoreException类的具体详情如下:
包路径:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
类名称: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());
  }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com