161. Spring Boot custom favicon.ico

 

【Video & Communication Platform】

à SpringBoot Video 

http://study.163.com/course/introduction.htm?courseId=1004329008&utm_campaign=commission&utm_source=400000000155061&utm_medium=share

à  SpringCloud video

http://study.163.com/course/introduction.htm?courseId=1004638001&utm_campaign=commission&utm_source=400000000155061&utm_medium=share

à Spring Boot source code 

https://gitee.com/happyangellxq520/spring-boot

à Spring Boot communication platform 

http://412887952-qq-com.iteye.com/blog/2321532

 

Origin of need:

       In a blog post " Download favicon.ico after Shiro has successfully logged in ", when it comes to the small icon of favicon.ico , spring Boot provides a default small leaf. So how do we modify it?

 

Close Favicon :

We can turn off favicon in application.properties , the default is on,

spring.mvc.favicon.enabled = false

 

Set up your own favicon

If you need to set up your own favicon , you only need to put your own favicon.ico (the file name cannot be changed) file in the classpath root directory, classpath META-INF/resources/ , classpath resources/ , classpath static/ under the classpath public/ .

 

Here favicon.ico is placed under src /main/resources/static



 
 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326829913&siteId=291194637