How to set custom favicon icon in Spring Boot
In this quick tutorial, we’ll discuss how to customize the favicon icon of a Spring Boot application. A favicon is a small website icon displayed in a browser.
1. Overriding default Favicon
Spring Boot will read favicon.ico from the classpath and serves it for all /favicon.ico requests. To override it simply put your custom favicon icon in
Make sure the favicon file should have the “favicon.ico” name.
We may also put that file in the
By default Spring Boot is serving its default green colored favicon icon:
2. Disabling Favicon
We can disable it by adding the following property in the application.properties file.
- Spring @RestController, @GetMapping, @PostMapping, @PutMapping, and @DeleteMapping Annotation Example
- Spring depends on attribute example
- Spring Boot Security- How to change default login page
- Versioning of REST API in Spring Boot: Types and Benefits
- Spring Task Scheduler Example using @Scheduled Annotation