Hi,
I have propertie in a file:
file.properties
I successfully injected this properties into a property of a bean when i create my bean in a XML file.
But i fail to inject with annotation, i do that :
spring-servlet.xml
Code:
[...]
<context:component-scan base-package="com.web" />
<context:property-placeholder location="classpath:file.properties"/>
</beans>
This is not a path error, the loading of file works
myClass.java
Code:
@Service("myClass")
public class MyClass{
private @Value("${file.prop}") String myProp;
[...]
}
And the error 
Code:
Could not autowire field: private java.lang.String com.web.MyClass.myProp; nested exception is java.lang.IllegalArgumentException: could not resolve placeholder 'file.prop'
I hope you have a solution ^^