Home >Web Front-end >Bootstrap Tutorial >How to use bootstrap in springboot

How to use bootstrap in springboot

angryTom
angryTomOriginal
2019-07-29 16:11:544175browse

How to use bootstrap in springboot

If you want to know more about bootstrap, you can click: bootstrap tutorial

First you need to add this sentence in the application.properties file

spring.mvc.static-path-pattern=/**

How to use bootstrap in springboot

otherwise it won’t work

There is another way Just use the CDN address of bootstrap. If you are not afraid of trouble, [slanted smile], it is recommended to use the above method

Example:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Bootstap demo </title>
        <link rel="stylesheet" href="/css/bootstrap.min.css">
    </head>
    <body>
    <nav aria-label="Page navigation">
        <ul class="pagination">
            <li>
                <a href="#" aria-label="Previous">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>
            <li><a href="#">1</a></li>
            <li><a href="#">2</a></li>
            <li><a href="#">3</a></li>
            <li><a href="#">4</a></li>
            <li><a href="#">5</a></li>
            <li>
                <a href="#" aria-label="Next">
                    <span aria-hidden="true">&raquo;</span>
                </a>
            </li>
        </ul>
    </nav>
    </body>
</html>

Rendering:

How to use bootstrap in springboot

The above is the detailed content of How to use bootstrap in springboot. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn