Files
spring-boot/documentation
Moritz Halbritter 3d960bc6d0 Add support for specifying encoding when loading files with spring.config.import
In the brackets we can now specify the encoding of the file instead of
only the file extension:

spring.config.import=classpath:import.properties[encoding=utf-8]

The old format

spring.config.import=classpath:import[.properties]

is still supported and is a shorthand for:

spring.config.import=classpath:import[extension=.properties]

Attributes can be combined, too:

spring.config.import=classpath:import[extension=.properties][encoding=utf-8]

Closes gh-28663
2026-02-03 16:30:03 +01:00
..