Spring Boot custom favicon.ico not showing
I solved this problem by putting favicon.ico in main/resource/static and adding this lines to my security config
httpSecurity
.authorizeRequests()
.antMatchers( "/favicon.ico").permitAll()
I have this with SpringBoot configuration too and is working
<link rel="shortcut icon" type="image/png" th:href="@{/img/favicon.png}"/>
And the favicon.png under resources/public/img