I am upgrading Spring Boot from 1.3 to 1.5. For upgrading to 1.5 I have replaced
@SpringApplicationConfiguration(classes = TestConfig.class)
@WebIntegrationTest
with
@SpringBootTest(classes = TestConfig.class)
Also, I am using
@Value("${local.server.port}")
protected int port;
to get port number defined in application.properties
file. I further use this port number to build a REST URL.
But after the upgrade I am getting the error below whereas the same works fine with 1.3
Spring Boot Test.
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'local.server.port' in value "${local.server.port}" at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:174)
Am I missing any changes that I need to do for this to work.