Demonstrates the Spring Boot environment conversion bug: spring-projects/spring-boot#9246
-
Clone this repository
git clone https://github.com/EthanRubinson/SpringBootEnvConversionBugDemo -
Navigate to the project
cd SpringBootEnvConversionBugDemo -
Build it
mvn clean install -
Run it
java -jar target/demo-0.0.1-SNAPSHOT.jar
App startup will fail because our custom conversion service is no longer associated with the environemnt and, consequently, there is no way to convert our custom String value to a URL.
-
Remove the entry from the application.properties file (or just remove the whole file)
rm src/main/resources/application.properties -
Build it
mvn clean install -
Run it
java -jar target/demo-0.0.1-SNAPSHOT.jar
The app will startup successfully and you will see "http://spring.io" printed in the console.