Colon in Real Estate Vault

In our application, we have a bean configuration in an XML file. In the XML file, I found this line:

<jee:jndi-lookup id="myVar"
                 jndi-name="java:jboss/application/myVar"
                 default-value="${application.myVar:}"/>

The value is ${application.myVar:}stored in the properties file.

What does the colon after mean application.myVar?

+4
source share
1 answer

First of all, nothing about JSTLno.

The expression ${...}comes from <property-placeholder/>.

colonmeans the separator between the value from the property placeholder and the default value. For example, your case:

application.myVar key to resolve the value from the properties file.

'empty line after colon' - the default value if it application.myVardoes not exist or is empty.

+3
source

Source: https://habr.com/ru/post/1537083/


All Articles