2015-02-06 170 views
0

这是我的应用程序上下文:我收到以下错误,同时启动JBoss服务器的

<bean id="propertyConfigurer" 
    class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer"> 
    <constructor-arg ref="configurationEncryptor" /> 
    <property name="locations"> 
     <list> 
      <value>classpath:mail.properties</value> 
     </list> 
    </property> 
</bean> 

<bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor"> 
    <property name="config" ref="environmentVariablesConfiguration" /> 
</bean> 

<bean id="environmentVariablesConfiguration" 
    class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig"> 
    <property name="algorithm" value="abcd" /> 
    <property name="password" value="xyz" /> 
</bean> 

<!-- for add or modify new variable. --> 
<bean class="java.util.Properties" id="applicationPropertiesParameter"> 
    <constructor-arg> 
     <map> 
      <entry key="lx.appName" value="${application.name}" /> 
      <entry key="lx.multipleRole" value="false" /> 
     </map> 
    </constructor-arg> 
</bean> 
    <import resource="mailContext.xml"/> 

我得到 “上下文初始化失败”,同时启动JBoss服务器:

org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'authenticationSuccessHandler' defined in class path resource [security/handlerContext.xml]: Could not resolve placeholder 'lx.alwaysUseDefaultTargetUrl' in string value "${lx.alwaysUseDefaultTargetUrl}" 
    at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:209) 

回答

0

您必须在属性文件中定义一个名为lx.alwaysUseDefaultTargetUrl的属性。

+0

是的,我说得对,它现在正确地工作。 – user2663110 2015-07-15 11:00:02