Spring boot使用Bootstrap

添加依赖

webjars
https://www.webjars.org/


<dependency>
    <groupId>org.webjarsgroupId>
    <artifactId>bootstrapartifactId>
    <version>4.0.0version>
dependency>

查看依赖
Spring boot使用Bootstrap_第1张图片
页面引用


<link href="asserts/css/bootstrap.min.css" th:href="@{/webjars/bootstrap/4.0.0/css/bootstrap.css}" rel="stylesheet">

Spring boot使用Bootstrap_第2张图片

优点

当项目名称,改变时
不需要修改,引用资源的路径地址

Spring boot
自动的添加,项目名的地址路径
Spring boot使用Bootstrap_第3张图片

你可能感兴趣的:(————Spring,Boot)