Spring Could not Resolve placeholder

后端 未结 8 2077
说谎
说谎 2020-12-08 10:29

I\'m fairly new to spring so excuse me if this is a dumb question. When I try to launch a program I get the following error: java.lang.IllegalArgumentException: Could

8条回答
  •  离开以前
    2020-12-08 11:27

    You are not reading the properties file correctly. The propertySource should pass the parameter as: file:appclient.properties or classpath:appclient.properties. Change the annotation to:

    @PropertySource(value={"classpath:appclient.properties"})
    

    However I don't know what your PropertiesConfig file contains, as you're importing that also. Ideally the @PropertySource annotation should have been kept there.

提交回复
热议问题