i am working on a simple spring project ; actually trying the injection through the properties file. i have to get the prop file in my applicationContext.xml file which they are not under the same directry :
/src |_.com.luv2code.springdemo | |_sport.properties |_resources |_applicationContext.xml
Trying to use this , but couldn't figure out the right classpath
<context:property-placeholder location="classpath:/sport.properties"/>
src/main/com.luv2code…
, not just src/com.luv2code…
. com.luv2code.springdemo
package. sport.properties
in the resources directory: src/main/resources
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.