在JSF + Spring应用程序中设置系统属性

时间:2013-10-25 13:05:47

标签: spring jsf-2

我正在使用JSF 2.0,Spring 3.1开发一个Web应用程序。

当我部署我的应用程序时,我收到以下错误

ERROR [ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'AllProjectDetailsBean' defined in ServletContext resource [/WEB-INF/springApp-spring.xml]: Could not resolve placeholder 'OutputFilePath'

应用程序上下文文件

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
    http://www.springframework.org/schema/aop 
    http://www.springframework.org/schema/aop/spring-aop-3.0.xsd ">

    <aop:aspectj-autoproxy />

    <bean id="placeholderConfig"
        class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    </bean>

    <bean id="AllProjectDetailsBean"
        class="com.tcs.srl.expertFinder.sections.ProjectDetailsBeanFactory"
        factory-method="createInstance">
        <constructor-arg index="0" value="${OutputFilePath}" />
    </bean>

我从错误中理解的是,当我部署应用程序时,第一次加载上下文但它失败了,因为它找不到任何名为 OutputFilePath 的属性。 这意味着我必须在上下文加载之前设置名为 OutputFilePath 的系统属性。

有些人可以告诉我如何在部署jsf应用程序时或在上下文加载之前设置系统属性。

或者有任何选项可以删除此错误。

请帮助

由于

0 个答案:

没有答案
相关问题