Spring 获取错误“;解析有效表达式后,表达式中还有更多数据:';lcurly({)和"x27";

Spring 获取错误“;解析有效表达式后,表达式中还有更多数据:';lcurly({)和"x27";,spring,spring-integration,Spring,Spring Integration,我正在为我的项目使用Spring集成。我正在尝试从xml文件(而不是.properties文件)读取属性/常量值。放置属性/常量的xml文件如下所示: <?xml version="1.0" encoding="UTF-8"?> <config> <persistence> <dataSourceName>CS/PowerSTEPP_CSSTEPPQA</dataSourceName> </persist

我正在为我的项目使用Spring集成。我正在尝试从xml文件(而不是.properties文件)读取属性/常量值。放置属性/常量的xml文件如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<config>

   <persistence>
      <dataSourceName>CS/PowerSTEPP_CSSTEPPQA</dataSourceName>
   </persistence>
  <customerservice>
   <headerNames>
   <jobName>jobDesignerJobName</jobName>
   </headerNames>
   <headerNames>
      <originalPayload>originalPayload</originalPayload>
   </headerNames>
   <headerNames>
      <originalPayloadDuplicate>originalPayload</originalPayloadDuplicate>
   </headerNames>
   <headerNames>
      <legacySystem>legacySystem</legacySystem>
   </headerNames>
   <headerNames>
      <businessArea>businessArea</businessArea>
   </headerNames>
   <routing>
      <jobChannel>headers.jobDesignerJobName+'-InputChannel'</jobChannel>
   </routing>
   <routing>
      <jobErrorChannel>headers.jobDesignerJobName+'-XsltTransformInputChannel'</jobErrorChannel>
   </routing>
   <legacySystem>
      <powerstepp>PowerSTEPP</powerstepp>
   </legacySystem>
   <PQProviderSearch>
      <storedProcedureName>PQPRVSCH</storedProcedureName>
   </PQProviderSearch>
   <PQProviderSearch>
      <ROWREQ>00001</ROWREQ>
   </PQProviderSearch>
   <PQProviderSearch>
      <DBGFLG>Y</DBGFLG>
   </PQProviderSearch>
   <PQProviderSearch>
      <SECDAT></SECDAT>
   </PQProviderSearch>
   <stylesheet>
      <PQProviderSearch>classpath:/CustomerServiceRD/spring-integration/stylesheets/PQProviderSearch.xsl</PQProviderSearch>
   </stylesheet>
   <stylesheet>
      <PQProviderSearchCount>classpath:/CustomerServiceRD/spring-integration/stylesheets/PQProviderSearchCount.xsl</PQProviderSearchCount>
   </stylesheet>
   <resultSet>
      <legacySystem>system</legacySystem>
   </resultSet>
   <resultSet>
      <rootNode>results</rootNode>
   </resultSet>
   <responseXml>
      <soapTemplate>CustomerServiceRD/JobDesigner-responseTemplate.xml</soapTemplate>
   </responseXml>
   <responseXml>
      <xmlBodyTag>//PQ</xmlBodyTag>
   </responseXml>
   <http>
      <header>
         <ressponseXml>
            <contentType>
               <value>CustomerServiceRD/JobDesigner-responseTemplate.xml</value>
            </contentType>
         </ressponseXml>
      </header>
   </http>
   <http>
      <header>
         <contentType>
            <value>CustomerServiceRD/JobDesigner-responseTemplate.xml</value>
         </contentType>
      </header>
   </http>
   <error>
      <Fault>Fault</Fault>
   </error>
   <error>
      <errorCode>1111</errorCode>
   </error>
   <headerNames>
      <hostAddress>hostAddress</hostAddress>
   </headerNames>
   <headerNames>
      <hostPort>hostPort</hostPort>
   </headerNames>
   <error>
      <Fault>faultcode</Fault>
   </error>
   <error>
      <faultstring>faultstring</faultstring>
   </error>
   <error>
      <faultactor>faultactor</faultactor>
   </error>
   <error>
      <detail>detail</detail>
   </error>
   <label>
      <externalSystem>ExternalSystem</externalSystem>
   </label>
   </customerservice>
</config>
<beans 
    <import resource="spring-integration/Jobs/*.xml"/>

    <!-- map of namespace prefix to URI -->
    <util:map id="xmlMessageNamespace">
        <entry key="SOAP" value="http://schemas.xmlsoap.org/soap/envelope/" />
    </util:map>
    <int:channel id="jobDesignerInputChannel" />
    <int:channel id="cs-exceptionHandlingChannel" />

    <bean id="msgHandler" class="com.dsths.cs.awd.jobs.PQMessageHandler" />

    <!-- TODO: Following lines are commented out as part of POC.-->
    <!--<bean id="xmlAggregator" class="com.dsths.cs.awd.jobs.XmlAggregator" />
    <bean id="httpOutboundGatewayHandler" class="com.dsths.cs.awd.jobs.HttpOutboundGatewayHandler" />
    <!--<bean id="xmlFilter" class="com.dsths.cs.awd.jobs.XmlFilter" />-->

    <int:chain input-channel="jobDesignerInputChannel" >

        <int-xml:xpath-header-enricher default-overwrite="true"  should-skip-nulls="true"  >
            <int-xml:header name="${customerservice.headerNames.legacySystem}"  xpath-expression="//LegacySystem"  evaluation-type="STRING_RESULT"  overwrite="true" />   
        </int-xml:xpath-header-enricher>        

        <!-- Some of the AWD jobs contain Business Area info under <code> tag, we should not keep that business area info in the 
        header since it is not required.This will help us in identifying AWD and Non-AWD jobs-->
        <int:header-enricher>
            <int:header name="${customerservice.headerNames.businessArea}" expression="#xpath(payload, '//businessArea/Code', 'boolean') ? null : #xpath(payload, '//businessArea')"/>
        </int:header-enricher>

        <int:router expression="${customerservice.routing.jobChannel}"/>
    </int:chain>

    <int:chain input-channel="cs-exceptionHandlingChannel">
        <!-- Service Activator to handle the errors --> 
        <int:service-activator  ref="msgHandler" method="handleError" />

        <!-- Router to routing the error messages to appropriate job channel for xsl transormation -->      
        <int:router expression="${customerservice.routing.jobErrorChannel}"/>
    </int:chain>           
</beans>
有人知道我哪里做错了吗?
如果我的问题不清楚,请告诉我。

根据StackTrace,您的问题在这里:

<int:router expression="${customerservice.routing.jobChannel}"/>

在使用如此困难的配置之前,您应该确保
customerservice
确实返回了所有所需的选项


如果您从Java的角度而不是从XML背景的角度展示了该对象的外观,那就太好了。

您在哪里/如何加载这个XML文件?@M.Deinum,我正在使用定制的apache配置框架来加载XML文件。
<int:router expression="${customerservice.routing.jobChannel}"/>