We are using a JNDI name as a property placeholder, for example:
property1=${jndi:comp/env/smtpuser}
When property1
is injected via a @Value
annotation, Spring will assign comp/env/smtpuser
as the value for property1
, since there is no jndi
property defined, resulting in the default value being used.
I know we can tweak with JndiLocatorDelegate
etc, but if it would be nice to be able to escape :
as a literal character so that it is not interpreted as the separator for the default value.
Comment From: sbrannen
Closely related to:
-
9628
Comment From: snicoll
@af6140 I am trying to understand your use case. Do you have to use the ${
and }
tokens for the value you want to inject? Or do you need to inject that exact value, as is? Is so, it looks like escaping the prefix is what you should be after.
Can you please clarify your use case and why the value is formatted that way? Regardless I am going to close this in favor of #9628.