Skip to content

Commit 0724c19

Browse files
committed
Keep to output configuration properties metadata of thymeleaf (apply workaround)
See mybatisgh-450
1 parent 918e7a7 commit 0724c19

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisLanguageDriverAutoConfiguration.java

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2015-2019 the original author or authors.
2+
* Copyright 2015-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -126,6 +126,25 @@ ThymeleafLanguageDriver thymeleafLanguageDriver(ThymeleafLanguageDriverConfig co
126126
public ThymeleafLanguageDriverConfig thymeleafLanguageDriverConfig() {
127127
return ThymeleafLanguageDriverConfig.newInstance();
128128
}
129+
130+
// This class provides to avoid the https://github.com/spring-projects/spring-boot/issues/21626 as workaround.
131+
@SuppressWarnings("unused")
132+
private static class MetadataThymeleafLanguageDriverConfig extends ThymeleafLanguageDriverConfig {
133+
134+
@ConfigurationProperties(CONFIGURATION_PROPERTY_PREFIX + ".thymeleaf.dialect")
135+
@Override
136+
public DialectConfig getDialect() {
137+
return super.getDialect();
138+
}
139+
140+
@ConfigurationProperties(CONFIGURATION_PROPERTY_PREFIX + ".thymeleaf.template-file")
141+
@Override
142+
public TemplateFileConfig getTemplateFile() {
143+
return super.getTemplateFile();
144+
}
145+
146+
}
147+
129148
}
130149

131150
}

0 commit comments

Comments
 (0)