Skip to content

Commit f7221be

Browse files
committed
Rename spring.favicon.enabled property
Rename `spring.favicon.enabled` to `spring.mvc.favicon.enabled`. See gh-2377
1 parent 0a4daf0 commit f7221be

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ private void addStaticIndexHtmlViewControllers(ViewControllerRegistry registry)
288288
}
289289

290290
@Configuration
291-
@ConditionalOnProperty(value = "spring.favicon.enabled", matchIfMissing = true)
291+
@ConditionalOnProperty(value = "spring.mvc.favicon.enabled", matchIfMissing = true)
292292
public static class FaviconConfiguration implements ResourceLoaderAware {
293293

294294
private ResourceLoader resourceLoader;

spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfigurationTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ public void faviconMappingDisabled() throws IllegalAccessException {
374374
this.context.register(Config.class, WebMvcAutoConfiguration.class,
375375
HttpMessageConvertersAutoConfiguration.class,
376376
PropertyPlaceholderAutoConfiguration.class);
377-
EnvironmentTestUtils.addEnvironment(this.context, "spring.favicon.enabled:false");
377+
EnvironmentTestUtils.addEnvironment(this.context,
378+
"spring.mvc.favicon.enabled:false");
378379
this.context.refresh();
379380
assertThat(
380381
this.context.getBeansOfType(ResourceHttpRequestHandler.class).get(

spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ content into your application; rather pick only the properties that you need.
9292
# SPRING MVC ({sc-spring-boot-autoconfigure}/web/WebMvcProperties.{sc-ext}[WebMvcProperties])
9393
spring.mvc.locale= # set fixed locale, e.g. en_UK
9494
spring.mvc.date-format= # set fixed date format, e.g. dd/MM/yyyy
95+
spring.mvc.favicon.enabled=true
9596
spring.mvc.message-codes-resolver-format= # PREFIX_ERROR_CODE / POSTFIX_ERROR_CODE
9697
spring.mvc.ignore-default-model-on-redirect=true # If the the content of the "default" model should be ignored redirects
9798
spring.view.prefix= # MVC view prefix
9899
spring.view.suffix= # ... and suffix
99-
spring.favicon.enabled=true
100100
101101
# SPRING RESOURCES HANDLING ({sc-spring-boot-autoconfigure}/web/ResourceProperties.{sc-ext}[ResourceProperties])
102102
spring.resources.cache-period= # cache timeouts in headers sent to browser

0 commit comments

Comments
 (0)