我在启动JBoss服务器时遇到错误

时间:2015-02-06 11:38:17

标签: java xml spring spring-mvc 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"/>

我得到&#34;上下文初始化失败&#34;启动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)

1 个答案:

答案 0 :(得分:0)

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