springboot使用webjars引入jquery

56 阅读1分钟

1.引入pom

        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>jquery</artifactId>
            <version>3.5.1</version>
        </dependency>

2.

自动映射 /webjars/**

www.webjars.org/

访问地址:http://localhost:8080/webjars/jquery/3.5.1/jquery.js 后面地址要按照依赖里面的包路径