Default values in property placeholder syntax aren't supported

Description

While trying to migrate our project to XAP 14.5, we noticed that default values don't work anymore in pu.xml. For example, ${some:0} used to default to 0 if foo was not defined during deployment. In XAP 14.5 the default value is not resolved, and an exception is thrown if the the value ${some:0} is assigned to an int field.

We tracked it down to BeanLevelPropertyPlaceholderConfigurer, in which a call to parseStringValue() in XAP < 14.5 was replaced with a call to PropertyPlaceholderHelper in XAP 14.5. However, no value separator is configured in this PropertyPlaceholderHelper, which means it doesn't work exactly like parseStringValue() used to work in Spring 4.x.

I will provide a pull request on Github to fix this.

Workaround

None

Acceptance Test

sgtest test.servicegrid.spring.SpringPropertiesTest

Status

Assignee

Yohana Khoury

Reporter

Bastien Jansen

Labels

None

Priority

Medium

SalesForce Case ID

12540

Fix versions

Commitment Version/s

None

Due date

None

Product

XAP

Edition

Open Source

Platform

All
Configure