springboot bootcdn使用示例详解
作者:o_瓜田李下_o 时间:2022-01-14 21:56:46
应用:直接使用bootcdn提供的静态资源,不需要本地存储
bootcdn 官网:https://www.bootcdn.cn/
staticfile cdn官网: http://www.staticfile.org/
常用静态资源
# layui.js
https://cdn.bootcdn.net/ajax/libs/layui/2.6.8/layui.js
https://cdn.bootcdn.net/ajax/libs/layui/2.6.8/layui.min.js
# layui.css
//unpkg.com/layui@2.6.8/dist/css/layui.css
https://www.layuicdn.com/layui-v2.6.8/css/layui.css
# jquery
https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js
https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js
# bootstrap
https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.0.2/css/bootstrap-grid.css
https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.0.2/css/bootstrap-grid.min.css
# react
https://cdn.bootcdn.net/ajax/libs/react-is/0.0.0-experimental-6f3fcbd6f-20210730/cjs/react-is.development.js
https://cdn.bootcdn.net/ajax/libs/react-is/0.0.0-experimental-6f3fcbd6f-20210730/cjs/react-is.development.min.js
# vue
https://cdn.bootcdn.net/ajax/libs/vue/3.2.0-beta.7/vue.cjs.js
https://cdn.bootcdn.net/ajax/libs/vue/3.2.0-beta.7/vue.cjs.min.js
*********************
示例
***************
配置文件
cdn.properties
layui=https://cdn.bootcdn.net/ajax/libs/layui/2.6.8/layui.min.js
jquery=https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js
***************
前端页面
index.html
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script th:src="${application.jquery}"></script>
<script th:src="${application.layuijs}"></script>
<link rel="stylesheet" th:href="${application.layuicss}">
<!--
<script>
$(function (){
$("#btn").click(function (){
alert("hello world");
})
})
</script>-->
<script>
layui.use('layer',function (){
var layer=layui.layer;
$("#btn").click(function (){
$("#1").html("瓜田李下<br>");
layer.msg('hello')
})
})
</script>
</head>
<body>
<div th:align="center">
<span id="1" style="background-color: purple;font-size: large"></span><br>
<button id="btn" class="layui-btn">点击一下</button>
</div>
</body>
</html>
*********************
来源:https://blog.csdn.net/weixin_43931625/article/details/119578346
标签:springboot,bootcdn
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Java集合类中文介绍
2022-07-22 18:02:20
![](https://img.aspxhome.com/file/2023/6/62536_0s.jpg)
将本地的jar包打到Maven的仓库中实例
2022-08-29 13:38:28
java制作简单验证码功能
2022-12-07 02:12:46
![](https://img.aspxhome.com/file/2023/5/60835_0s.jpg)
Hadoop+HBase+ZooKeeper分布式集群环境搭建步骤
2022-02-13 01:16:33
简单了解Java断言利器AssertJ原理及用法
2022-07-12 15:54:21
springboot访问template下的html页面的实现配置
2023-02-09 23:33:21
![](https://img.aspxhome.com/file/2023/5/61085_0s.png)
C#实现窗体抖动的两种方法
2021-10-06 10:20:52
![](https://img.aspxhome.com/file/2023/6/80056_0s.jpg)
C# 打开电子邮件软件的具体方法
2022-07-02 10:53:07
使用webmagic实现爬虫程序示例分享
2021-10-08 22:10:26
Java使用fill()数组填充的实现
2022-02-06 15:03:33
Java 超详细讲解ThreadLocal类的使用
2021-11-13 05:58:29
![](https://img.aspxhome.com/file/2023/2/71012_0s.png)
JavaSE static final及abstract修饰符实例解析
2021-07-01 10:54:54
![](https://img.aspxhome.com/file/2023/9/62129_0s.png)
Java nacos动态配置实现流程详解
2021-06-04 19:18:30
![](https://img.aspxhome.com/file/2023/5/83555_0s.png)
java Spring的启动原理详解
2022-09-02 04:39:59
![](https://img.aspxhome.com/file/2023/4/66244_0s.jpg)
关于@Autowired注入依赖失败的问题及解决
2023-11-29 00:50:42
![](https://img.aspxhome.com/file/2023/4/60474_0s.png)
VsCode使用EmmyLua插件调试Unity工程Lua代码的详细步骤
2022-12-25 14:13:25
![](https://img.aspxhome.com/file/2023/0/81130_0s.png)
java实现List中对象排序的方法
2023-11-08 21:36:29
SpringBoot解决BigDecimal传到前端后精度丢失问题
2021-12-13 14:44:39
![](https://img.aspxhome.com/file/2023/8/80258_0s.png)
Spring Boot从Controller层进行单元测试的实现
2023-07-21 03:07:10
SpringBoot接口如何对参数进行校验
2021-08-30 17:25:00
![](https://img.aspxhome.com/file/2023/5/74895_0s.png)