Using spring3 @Value to access PropertyPlaceholderConfigurer values?

后端 未结 3 1326
猫巷女王i
猫巷女王i 2021-01-17 13:37

I\'m trying to set the value of a string in a spring bean using @Value, when my property source is a subclass of PropertyPlaceholderConfigurer. Any

3条回答
  •  [愿得一人]
    2021-01-17 14:25

    Have you managed to get it to work by explicitly injecting the value from the bean definition file using the property syntax? In theory, if that works, then you should be able to use the same expression in @Value. For that matter, you should be able to do it using @Autowired @Qualifier also

提交回复
热议问题