Description
Under Spring Boot 2.4.4 having a configuration class with a java.nio.Path field does not map correctly for a root filesystem on Linux if the spring-boot-web-starter is included.
Example application.properties value:
my-config.workingPath=/my-working-path
When the above is run on linux with the web starter included, the path is set under the tomcat temp directory, or under the exploded WAR file directory if running on a different application server.
If the path is set to a value such as: c:\temp\my-working-path on a Windows machine, there is no issue with or without the web starter dependency.
Creating a ConfigurationPropertiesBinding converter seems to be picked up when running on Windows, but ignored on Linux.
Changing the properties class field from java.nio.Path to String and implementing a custom get method that returns Paths.get(s) works fine on windows and linxu both with and without the web starter included in the project.
Issue does not seem to exist prior to Spring Boot 2.4.4.