How do I update the value of an @Autowired String bean in Spring?

后端 未结 3 888
情歌与酒
情歌与酒 2021-02-14 00:07

I have a String that I\'m autowiring as a bean. The value for the String is set via a properties file, and is loaded at runtime. That much I can verify. Here\'s

3条回答
  •  萌比男神i
    2021-02-14 00:21

    Every time you want to change your spring injected values through changing the configuration, you are going to have to restart your container, which usually involves restarting your server.

提交回复
热议问题