Change favicon StaticResourceLocation
Prior to this commit, the `StaticResourceLocation` for favicons would point to `"/**/favicon.ico"`. This location does not reflect the current web development landscape, since the png format and size variants are not supported here. Also, the `"**"` pattern can be costly at runtime and is deprecated by the new path pattern support in Spring Framework (see gh-22833). This commit changes the default locations to `"/favicon.*","/*/icon-*"`, supporting common use cases such as `"/favicon.ico"`, `"/favicon.png"` and `"/icons/icon-48x48.png"`. Closes gh-23126
This commit is contained in:
@@ -2639,13 +2639,6 @@ If either is found, it is automatically used as the welcome page of the applicat
|
||||
|
||||
|
||||
|
||||
[[boot-features-spring-mvc-favicon]]
|
||||
==== Custom Favicon
|
||||
As with other static resources, Spring Boot looks for a `favicon.ico` in the configured static content locations.
|
||||
If such a file is present, it is automatically used as the favicon of the application.
|
||||
|
||||
|
||||
|
||||
[[boot-features-spring-mvc-pathmatch]]
|
||||
==== Path Matching and Content Negotiation
|
||||
Spring MVC can map incoming HTTP requests to handlers by looking at the request path and matching it to the mappings defined in your application (for example, `@GetMapping` annotations on Controller methods).
|
||||
|
||||
Reference in New Issue
Block a user