SpringBoot引入Bootstrap

一、pom中引入依赖

<dependency>
    <groupId>org.webjarsgroupId>
    <artifactId>bootstrapartifactId>
    <version>3.3.5version>
dependency>
<dependency>
    <groupId>org.webjarsgroupId>
    <artifactId>jqueryartifactId>
    <version>3.1.1version>
dependency>

二、在页面中使用


<html xmlns:th="http://www.thymeleaf.org">
<head lang="en">
    <meta charset="UTF-8" />
    <title>首页title>

    
    <link rel="stylesheet" href="/webjars/bootstrap/3.3.5/css/bootstrap.min.css" />
    <script src="/webjars/jquery/3.1.1/jquery.min.js">script>
    <script src="/webjars/bootstrap/3.3.5/js/bootstrap.min.js">script>
head>
<body>
    <div class="container">
        首页内容

    div>
body>
html>

你可能感兴趣的:(后端)