Why is Spring @Value incompatible with @Controller?

前端 未结 4 1927
执念已碎
执念已碎 2021-01-13 13:00

I\'m looking for a better understanding of this problem. A workaround is pretty simple, namely move the configuration data to another class that does not have proxies/advic

4条回答
  •  迷失自我
    2021-01-13 13:33

    In my case I solve that this way: in spring-servlet.xml before i put this:

    
    

    While strings.properties file I put to src/main/resources/.

    Note: context:property-placeholder tag has limited visibility so i have read somewhere recommendation to duplicate it in every context file, where you use strings from it.

提交回复
热议问题