Using Your Favorite Favicon in Spring MVC

Spring MVC by default provides you with a Favicon which it displays from /favicon.ico.

It’s a fine looking icon, to be sure, but you may have another favicon in mind, or you might need to load your favicon from another location. Here’s the 2 minute How-To on┬áreplacing Spring’s default favicon with your favorite and at the location you desire.

First turn off Spring MVC’s favicon display in your file.

spring.mvc.favicon.enabled = false

Halfway home. Now do your HTML thing in the template or template fragment of your choice.

That’s what we want to see! My favorite favicon!