解决方案:在index页面title标签下面加入
<link rel="bookmark" href="/favicon.ico"/>
<link rel="icon" href="/favicon.ico"/>
如果是thymeleaf,加入
<link th:rel="bookmark" th:href="@{/favicon.ico}"/>
<link th:rel="icon" th:href="@{/favicon.ico}"/>
解决方案:在index页面title标签下面加入
<link rel="bookmark" href="/favicon.ico"/>
<link rel="icon" href="/favicon.ico"/>
如果是thymeleaf,加入
<link th:rel="bookmark" th:href="@{/favicon.ico}"/>
<link th:rel="icon" th:href="@{/favicon.ico}"/>