Java 在spring中读取属性文件时出现错误404
我正在尝试从属性文件读取数据。我已经用xml指定了路径。当我运行应用程序时,它会抛出一个错误- *org.springframework.beans.factory.BeanDefinitionStoreException:在ServletContext资源[/WEB-INF/applicationContext.xml]中定义的名为“fbStuffKeeper”的bean定义无效:无法解析占位符“facebook.appId” My applicationContext.xml-Java 在spring中读取属性文件时出现错误404,java,spring,Java,Spring,我正在尝试从属性文件读取数据。我已经用xml指定了路径。当我运行应用程序时,它会抛出一个错误- *org.springframework.beans.factory.BeanDefinitionStoreException:在ServletContext资源[/WEB-INF/applicationContext.xml]中定义的名为“fbStuffKeeper”的bean定义无效:无法解析占位符“facebook.appId” My applicationContext.xml- &l
<bean
class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" />
<bean
class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" />
<context:component-scan base-package="com.cognizant.awcoe.bazaar.social.spring.controllers" use-default-filters="false">
<context:include-filter expression="org.springframework.stereotype.Controller" type="annotation" />
</context:component-scan>
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:/com/social/spring/config/facebook.properties"/>
</bean>
<bean id="fbStuffKeeper" class="com.social.spring.facebook.FBStuffManager">
<property name="secret" value="${facebook.appSecret}"/>
<property name="clientId" value="${facebook.appId}"/>
<property name="redirectURI" value="${redirect.uri}"/>
</bean>
</beans>
我是否正确指定了属性文件的路径..哪里出错了??
请纠正我看来像是上一次的错误案例:
facebook.appId
,而不是facebook.appId是的!!它确实删除了错误,但仍然弹出404错误…我没有收到任何错误,但在名为“SpringSocial”的DispatcherServlet中没有找到URI为[/SpringSocial/login.htm]的HTTP请求的映射
facebook.appID=xxxxxxxxxxxxxxxxxx
facebook.appSecret=xxxxxxxxxxxxxxxxxx
redirect.uri=http:xxxxxxxxxxxxxxxxxx