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
Since String
is immutable, you cannot just change its underlying value and have everyone that has a reference to it be updated.
You can change the reference of the String
that an instance of Foo
is holding onto to point to a different String
, but it will only be realized by objects that are working with the specific Foo
you updated. If Foo
is a Spring singleton, this shouldn't be an issue though...