I am trying to read data from properties file.I have specified the path in xml.When I run the app it throws an error –
*org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name ‘fbStuffKeeper’ defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Could not resolve placeholder ‘facebook.appId’
My applicationContext.xml –
<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.properties contain-
facebook.appID=xxxxxxxxxxxxxxxxxx
facebook.appSecret=xxxxxxxxxxxxxxxxxx
redirect.uri=http:xxxxxxxxxxxxxxxxxx
Have I specified the path of the properties file correctly..Where did I go wrong??
Kindly correct me
Looks like a mistaken case of the last
d:facebook.appIdinstead offacebook.appID