Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem of Spring Boot favicon Chrome setting

Shulou Source: shulou.com Published: 2022-06-02 17:57:07 11月16日 Update

This article mainly explains "how to solve the Spring Boot favicon Chrome setting problem". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to solve the Spring Boot favicon Chrome setting problem".

Other materials show that you can Copy the favicon.ico image file to the resource folder by default, including the files defined by SpringBoot are:

Private static final String [] CLASSPATH_RESOURCE_LOCATIONS = {"classpath:/META-INF/resources/", "classpath:/resources/", "classpath:/static/", "classpath:/public/"}

I first put the picture in the default root directory, but how to display it can not be displayed, and use the

It cannot be loaded and cannot be displayed on the page by address.

Therefore, put the picture under the images of the above resource folder, and the picture can be displayed on the page and accessed through the browser address.

However, the browser tag page still does not display small pictures, and the tag is added.

Successful display

The full code is:

Title

Welcome to the home page rrr-res

Thank you for your reading, the above is the content of "how to solve the Spring Boot favicon Chrome setting problem", after the study of this article, I believe you have a deeper understanding of how to solve the problem of Spring Boot favicon Chrome setting, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Pictures questions files pages learning content addresses folders tags browsers resources browsing success code that is ideas situations articles more root directory Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info MySQL macOS Xiaomi Shulou Information