I'm wondering if the @TestPropertySource
will honor SpEL or will at least allow a property to substitute values from another property.
It's a similar question to @TestPropertySource with dynamic properties
Assuming the properties I'm referring to exist in one of the files in the locations
attribute...
For example if I'd like to do something like:
@TestPropertySource(
locations = {"classpath:application.properties", "classpath:database.properties"},
properties = {"newPortNum = #{1 + Integer.parseInt(${myapp.web.server.port.ssl})}})
Or this:
@TestPropertySource(
locations = {"classpath:application.properties", "classpath:database.properties"},
properties = {"outputFile = ${outputDir}/foo.txt"})
Do I need to implement a TestExecutionListener
or @BootstrapWith
to accomplish this?