Skip to content

Commit 391e2f7

Browse files
committed
Make META-INF/spring/logback-pattern-rules repeatable
See gh-32756
1 parent a87aca2 commit 391e2f7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/SpringBootJoranConfigurator.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
import org.springframework.beans.factory.aot.BeanFactoryInitializationAotContribution;
5656
import org.springframework.beans.factory.aot.BeanFactoryInitializationCode;
5757
import org.springframework.boot.logging.LoggingInitializationContext;
58+
import org.springframework.core.CollectionFactory;
5859
import org.springframework.core.io.ByteArrayResource;
5960
import org.springframework.core.io.ClassPathResource;
6061
import org.springframework.core.io.Resource;
@@ -320,7 +321,7 @@ private void save(GenerationContext generationContext) {
320321
}
321322

322323
private InputStream asInputStream(Map<String, String> patternRuleRegistry) {
323-
Properties properties = new Properties();
324+
Properties properties = CollectionFactory.createSortedProperties(true);
324325
patternRuleRegistry.forEach(properties::setProperty);
325326
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
326327
try {

0 commit comments

Comments
 (0)