If an application.properties file has the following content:

#
property1.name=value1
property2.name=value2

The second line (property1.name=value1) is skipped over and not loaded. It does not seem to matter where in the file this pattern occurs.

This started happening in spring boot 2.4.0. Previously in spring boot 2.3.5 it worked properly.