投稿

2フォロワー フォローする
0
Avatar

How do I change the favicon.ico from the spring leaf to my own figure?

I have a Spring Boot application in which I want to replace my favicon with Boot's default favicon i.e.the green leaf. To resolve the problem, I have tried the following:

1. Externally create FaviconConfiguration class

2. Set property spring.mvc.favicon.enabled to false.

Unfortunately, this didn't solve the problem

NEELMANI SINDWANI

ログインにログインしてコメントを残してください。

1件のコメント

0
Avatar

You don't need to do either of those.  Just drop your favicon.ico file into `src/main/resources/static`.  Then restart your app & test with `curl -O http://your-app-domain/favicon.ico`.  This will confirm it's working.

You may need to jump through some hoops to get your browser to refresh the favicon.  They tend to agressively cache that file.  See here for some suggestions.

Daniel Mikusa 0 票