You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to Spring Boot 2.2.0.M5 custom favicon placed in src/main/resources/static/favicon.ico stopped working, and Boot's default favicon is returned instead.
At quick glance, I suspect this is a regression caused by #17318. It seems unintended, as this comment states that:
A custom favicon placed somewhere beneath a static resources location will also continue to work as it did before.
Which isn't the case, unless I misunderstood something.
This can be easily reproduced with a minimal application using just spring-boot-starter-web and having custom favicon placed in src/main/resources/static/favicon.ico. Downgrading to 2.2.0.M4 restores the expected behavior.
The text was updated successfully, but these errors were encountered:
When fixing #17318, I was too focused on the nested case, GET /explorer/favicon.ico for example, and did not consider the simpler and more common case of GET /favicon.ico. This simpler case is a direct match for the favicon.ico resource handler mapping to classpath:favicon.ico so the favicon found by the classpath, typically Boot's, is always returned.
Thanks for trying out M5, @vpavic. This should now be fixed on master. You should be able to work around the problem with M5 by moving your favicon.ico into src/main/resources so that it can be found at the root of the classpath. Alternatively, you could set spring.mvc.favicon.enabled=false.
After upgrading to Spring Boot
2.2.0.M5
custom favicon placed insrc/main/resources/static/favicon.ico
stopped working, and Boot's default favicon is returned instead.At quick glance, I suspect this is a regression caused by #17318. It seems unintended, as this comment states that:
Which isn't the case, unless I misunderstood something.
This can be easily reproduced with a minimal application using just
spring-boot-starter-web
and having custom favicon placed insrc/main/resources/static/favicon.ico
. Downgrading to2.2.0.M4
restores the expected behavior.The text was updated successfully, but these errors were encountered: