如何解决异常:无法在Spring中解析占位符?

时间:2017-09-20 15:43:29

标签: java spring

我正在我的本地部署我的网络应用,但出于某种原因Spring正在抛出java.lang.IllegalArgumentException: Could not resolve placeholder 'safenet.username' in string value "${safenet.username}"例外。我无能为力?

堆栈跟踪:

org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'SafenetEncryptionProvider' defined in ServletContext resource [/WEB-INF/spring-config/spring-config.xml]: Could not resolve placeholder 'safenet.username' in string value "${safenet.username}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'safenet.username' in string value "${safenet.username}"

这是豆

<bean id="SafenetEncryptionProvider" class="package.SafenetStringEncryptionProvider" init-method="initialize" destroy-method="destroy">
    <property name="username">
        <value>${safenet.username}</value>
    </property>
    <property name="password">
        <value>${safenet.password}</value>
    </property>
    <property name="keyName">
        <value>${safenet.key}</value>
    </property>
    <property name="enabled">
        <value>${safenet.enabled}</value>
    </property>                 
</bean>

我错过了什么吗?

...谢谢

0 个答案:

没有答案