一开始在将BootStrap整合到项目中时,以为SpringBoot项目和以前的javaWeb一样,直接在页面中引用css,js即可,但是打开界面时,样式效果出不来,后来看了几篇文章以及自己摸索,现将代码展示如下:
1.Pom文件
<properties>
<webjars-locator>0.32-1</webjars-locator>
<bootstrap>3.3.7</bootstrap>
<jquery>3.3.1</jquery>
</properties>
这是需要导入的依赖
<dependency>
<groupId>org.webjars</groupId>
<artifactId>webjars-locator</artifactId>
<version>${webjars-locator}</version>
</dependency>
<!-- bootstrap -->
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>${bootstrap}</version>
</dependency>
<!-- jquery -->
<dependency>
<groupId>org.webjars</g