ECMAScript 6 学习二async函数

1、什么是async函数

2、用法

  2.1基本用法

3、语法

  3.1返回promise对象

  3.2promise状态的变化

  3.3await命令

1、什么是async函数

async函数也是异步编程的解决方案。

async函数是对是对generator函数进行了改进。

readFile = Promise(<span style="color: #0000ff;">var gen = <span style="color: #0000ff;">function*<span style="color: #000000;"> () {
<span style="color: #0000ff;">var
f1 = yield readFile('/etc/fstab'<span style="color: #000000;">);
<span style="color: #0000ff;">var
f2 = yield readFile('/etc/shells'<span style="color: #000000;">);
console.log(f1.toString());
console.log(f2.toString());
};

后边的gen函数,写成async函数

asyncReadFile = async f1 = await readFile('/etc/fstab' f2 = await readFile('/etc/shells'

async函数就是将generator函数的星号(*)换成async,将yield替换成await。

 async函数对generator函数进行改进,体现以下四点。

(1)内置执行器。

generator函数的执行必须依靠执行器,而async函数自带执行器,也就是说,async函数的执行与普通函数一模一样,只要一行。

下面代码调用了asyncReadFile函数,然后就会自动执行,输出最后的结果。这个完全不像generator函数,需要调用next方法,才能得到最终的结果。

result=asyncReadFile();

(2)更好的语义

async和await,比起星号(*)和yield,语义更清楚。async表示函数中有异步操作,await表示紧跟其后的表达式需要等待结果。

(3)更广的适用性

yield命令后面只能是Thunk函数或者promise对象,而async函数的await命令后面,可以是promise对象和原始类型的值(数值,字符串和布尔值,但这等同于同步操作)

(4)返回值是promise

async函数的返回值是promise对象,执行generator函数返回一个遍历器对象(Iterator对象)方便多了,也就是说,async函数可以看做是多个异步操作,包装成一个promise对象,而await命令是内部then命令的语法糖。

2、用法

2.1基本用法

async函数返回的是一个promise对象,可以使用then方法添加回调函数。当函数执行的时候,一旦遇到await就会先返回,等到异步操作完成,再接着执行函数体内后面的语句。

举一个栗子

Promise((resolve) =>async <span style="color: #0000ff;">function<span style="color: #000000;"> asyncPrint(value,ms) {
await timeout(ms);
console.log(value);
}

asyncPrint('hello world',5000);

上面代码指定5秒后输出hello world。

 async函数多种使用形式

async <span style="color: #008000;">//<span style="color: #008000;">函数表达式
const foo = async <span style="color: #0000ff;">function
<span style="color: #000000;"> () {}

<span style="color: #008000;">//<span style="color: #008000;">对象的方法
let obj =<span style="color: #000000;"> { async foo() {} }
obj.foo().then(...)

<span style="color: #008000;">//<span style="color: #008000;">箭头函数
const foo = async () =><span style="color: #000000;"> {};

<span style="color: #008000;">//<span style="color: #008000;">class方法
<span style="color: #000000;">class Storage {
constructor() {
<span style="color: #0000ff;">this.cachePromise = caches.open('avatars'<span style="color: #000000;">);
}

async getAvatar(name) {
const cache = await <span style="color: #0000ff;">this<span style="color: #000000;">.cachePromise;
<span style="color: #0000ff;">return cache.match(/avatars/<span style="color: #000000;"&gt;${name}.jpg);
}
}

3、语法

 async函数的语法规则总体上比较简单,难点是错误处理机制。

3.1返回的promise对象

async函数返回的是promise对象。

async函数内部return语句返回值,会成为then方法回调函数的参数

async 'hello world'f().then(v => console.log(v))

上面代码中,函数f内部return 命令返回值,会被then方法回调函数接收到。输出“hello world”。

async函数内部抛出的错误,会导致返回的promise对象变成reject状态。抛出的错误对象会被catch方法回调函数接收到。

3.2promise对象状态变化 

async函数返回的promise对象,必须等到内部的所有的await命令后边的promise对象执行完,才会发生状态的改变,除非遇到return语句或者抛出错误。也就是说,只有async函数内部的异步操作执行完,才会执行then方法指定的回调函数。

举个栗子

async == html.match(/([\s\S]+)<\/title>/i)[1<span style="color: #000000;">]; } getTitle(</span>'https://tc39.github.io/ecma262/').then(console.log)</pre> </div> <p><p class="pic_center"><img src="https://www.jb51.cc/res/2019/02-15/23/eff281e775c538b8afce7b66dba6f072.png" alt=""></p></p> <p>上面代码中,函数getTitle内部有三个操作:抓取网页,取出文本,匹配页面标题。只有三个操作全部完成,才会执行then方法里面console.log。</p> <p> <strong>3.3 await命令 </strong></p> <p> 正常情况下,await命令后边是一个promise对象。如果不是,会被转成一个一个立即resolve的promise对象。</p> <div class="cnblogs_code"> <pre>async <span style="color: #0000ff;">function</span><span style="color: #000000;"> f() { </span><span style="color: #0000ff;">return</span> await 123<span style="color: #000000;">; } <p>f().then(v </span>=> console.log(v))</pre></p> </div> <p><p class="pic_center"><img src="https://www.jb51.cc/res/2019/02-15/23/31d711cf9699e7880a95a5e7d4c6bc1c.png" alt=""></p></p> <p>上面代码中,await命令的参数是数值123,他被转成promise对象,并立即resolve。</p> <p>await命令后边的promise对象如果变成reject状态,则reject的参数会被catch方法的回调函数接收到。</p> <p>举个栗子</p> <div class="cnblogs_code"> <pre>async <span style="color: #0000ff;">function</span><span style="color: #000000;"> f() { await Promise.reject(</span>'出错了'<span style="color: #000000;">); } <p>f()<br /> .then(v </span>=><span style="color: #000000;"> console.log(v))<br /> .</span><span style="color: #0000ff;">catch</span>(e => console.log(e))</pre></p> </div> <p><p class="pic_center"><img src="https://www.jb51.cc/res/2019/02-15/23/066b7a851dcb26e2e16fbd4c095390aa.png" alt=""></p></p> <p>上面代码中,await语句前面没有return,但是reject方法的参数依然传入catch方法的回调函数,这里如果在wawait前面加上return,效果是一样的。</p> <p> <strong>只要一个await语句后面的promise变成了reject,那么整个async函数都会中断执行。</strong></p> <div class="cnblogs_code"> <pre>async <span style="color: #0000ff;">function</span><span style="color: #000000;"> f() { await Promise.reject(</span>'出错了'<span style="color: #000000;">); await Promise.resolve(</span>'hello world'); <span style="color: #008000;">//</span><span style="color: #008000;"> 不会执行</span> }</pre> </div> <p>上面代码中,第二个<code>await</code>语句是不会执行的,因为第一个<code>await</code>语句状态变成了<code>reject</code>。</p><p class="text-muted" style="margin-top:20px;">版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。</p> </div></div> </div> </div> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <h3>相关推荐</h3> <hr /> <div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/1187915.html" title="使用input+datalist简单实现实时匹配的可编辑下拉列表-并解决选定后浏览器默认只显示value的可读性问题">使用input+datalist简单实现实时匹配的可编辑下拉列表-并解决选定后浏览器默认只显示value的可读性问题</a></div> <div class="summary">问题背景 最近小伙伴提了一个希望提高后台下拉列表可操作性的需求,原因是下拉列表选项过多,每次下拉选择比较费时费力且容易出错,硬着头皮啃了啃前端知识,网上搜寻了一些下拉列表实现的资料,这里总结一下。 P</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/1178240.html" title="前端js生成任意随机数">前端js生成任意随机数</a></div> <div class="summary">// n位随机数生成 function randomNum(n) { let sString = &quot;&quot;; let strings = &quot;abcdefghijklmnopq</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/1012172.html" title="Web前端:HTML最强总结 附详细代码">Web前端:HTML最强总结 附详细代码</a></div> <div class="summary">HTML是HyperText Markup Language的简称,中文名称:超文本标记语言,它是一种用于创建网页的 标准标记语言</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/1012171.html" title="Web前端:CSS最强总结 附详细代码">Web前端:CSS最强总结 附详细代码</a></div> <div class="summary">层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/1012170.html" title="Web前端:JavaScript最强总结 附详细代码 带常用案例!">Web前端:JavaScript最强总结 附详细代码 带常用案例!</a></div> <div class="summary">JavaScript 是脚本语言,是一种解释性脚本语言(代码不进行预编译)</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/992748.html" title="糟糕的设计会为我们的工作带来什么启发?">糟糕的设计会为我们的工作带来什么启发?</a></div> <div class="summary">本文由葡萄城技术团队原创并首发 转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具、解决方案和服务,赋能开发者。 一名开发者或设计师通常可以在一秒内指出优秀的设计,但对于糟糕的设计只需最多半</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/992747.html" title="想实现多人协作的“在线Excel”?真没那么简单">想实现多人协作的“在线Excel”?真没那么简单</a></div> <div class="summary">本文由葡萄城技术团队原创并首发 转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具、解决方案和服务,赋能开发者。 Excel是我们办公中常用的工具 ,它几乎能为我们处理大部分数据,友好的交互</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/992746.html" title="怎样使我们的用户不再抵触填写Form表单?">怎样使我们的用户不再抵触填写Form表单?</a></div> <div class="summary">转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具、解决方案和服务,赋能开发者。 原文出处:https://blog.bitsrc.io/8-tips-for-an-awesome-sign</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/992745.html" title="不要再造轮子了:聊一聊 JavaScript 的 URL 对象是什么?">不要再造轮子了:聊一聊 JavaScript 的 URL 对象是什么?</a></div> <div class="summary">本文由葡萄城技术团队于博客园翻译并首发 转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具、解决方案和服务,赋能开发者。 如果我们自己编写从URL中分析和提取元素的代码,那么有可能会比较痛苦</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/992744.html" title="Deno会在短期内取代Node吗?">Deno会在短期内取代Node吗?</a></div> <div class="summary">转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具、解决方案和服务,赋能开发者。 原文出处:https://blog.bitsrc.io/what-is-deno-and-will-it-r</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/992743.html" title="您知道SASS吗?">您知道SASS吗?</a></div> <div class="summary">转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具、解决方案和服务,赋能开发者。 原文出处:https://blog.bitsrc.io/4-reasons-to-use-sass-in-y</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/992742.html" title="还学的动吗? 盘点下Vue.js 3.0.0 那些让人激动的功能">还学的动吗? 盘点下Vue.js 3.0.0 那些让人激动的功能</a></div> <div class="summary">转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具、解决方案和服务,赋能开发者。 原文出处:https://blog.bitsrc.io/vuejs-3-0-0-beta-features-</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/992741.html" title="SessionStorage、LocalStorage详解">SessionStorage、LocalStorage详解</a></div> <div class="summary">转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具、解决方案和服务,赋能开发者。 原文出处:https://blog.bitsrc.io/sessionstorage-and-localst</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/992740.html" title="详细了解JS Map,它和传统对象有什么区别?">详细了解JS Map,它和传统对象有什么区别?</a></div> <div class="summary">一直以来,JavaScript使用数组和对象来定义和存放结构化数据, 在这篇文章中,我们将一起深挖另一种对象Map的一切,我们将会去了解它是什么、如何遍历、都包括什么属性和方法以及优缺点是什么。</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/992739.html" title="合理使用CSS框架,加速UI设计进程">合理使用CSS框架,加速UI设计进程</a></div> <div class="summary">由于CSS的出现,现在的网站风格已经与它们很早之前的样子有了很大的不同。CSS的出现为原本平平无奇的网页注入了活力。这也是网站的用户体验得到进一步进化的原因。这可能就是当今几乎所有的网站或多或少都在使</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/992738.html" title="开发一个渐进式Web应用程序PWA前都需要了解什么?">开发一个渐进式Web应用程序PWA前都需要了解什么?</a></div> <div class="summary">自苹果推出了iPhone应用商店以来,App成为了我们生活中不可或缺的一部分,而对于实体业务也是如此,现在各行业都在推出自己的App,但有没有人想过这样一种场景,如果自己的潜在客户还没有安装你的App</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/992736.html" title="前端开发:这10个Chrome扩展你不得不知">前端开发:这10个Chrome扩展你不得不知</a></div> <div class="summary">转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具、解决方案和服务,赋能开发者。 原文出处:https://blog.bitsrc.io/10-top-chrome-extensions-f</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/992735.html" title="你的按钮到底在帮助用户还是在误导用户?">你的按钮到底在帮助用户还是在误导用户?</a></div> <div class="summary">转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具、解决方案和服务,赋能开发者。 原文出处:https://blog.bitsrc.io/do-your-buttons-lead-or-mi</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/992734.html" title="三步带你开发一个短链接生成平台">三步带你开发一个短链接生成平台</a></div> <div class="summary">本文由葡萄城技术团队原创并首发 转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具、解决方案和服务,赋能开发者。 前段时间在开发【葡萄城社区】公众号时有一个功能是需要用网页授权认证地址生成二</div> </div><div class="list_con"> <div class="title"><a href="https://www.jb51.cc/webfrontend/992733.html" title="给萌新HTML5 入门指南">给萌新HTML5 入门指南</a></div> <div class="summary">本文由葡萄城技术团队原创并首发 转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具、解决方案和服务,赋能开发者。 HTML5的发展改变了互联网技术趋势,前端热度依旧不减,所以对于应用开发人员</div> </div></div> </div> </div> </div> <div class="col-sm-12 col-md-12 col-lg-3"> <!-- row --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <!-- jb51-article-300x600 --> <ins class="adsbygoogle" style="display:inline-block;width:300px;height:600px" data-ad-client="ca-pub-4605373693034661" data-ad-slot="7541177540"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> <!-- row end --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <label class="main-content-label ">热门文章</label> <ul class="n-list"><li><a href="https://www.jb51.cc/webfrontend/1187915.html" title="使用input+datalist简单实现实时匹配的可编辑下拉列表-并解决选定后浏览器默认只显示value的可读性问题">• 使用input+datalist简单实现实时匹配的…</a></li><li><a href="https://www.jb51.cc/webfrontend/1178240.html" title="前端js生成任意随机数">• 前端js生成任意随机数</a></li><li><a href="https://www.jb51.cc/webfrontend/1012172.html" title="Web前端:HTML最强总结 附详细代码">• Web前端:HTML最强总结 附详细代码</a></li><li><a href="https://www.jb51.cc/webfrontend/1012171.html" title="Web前端:CSS最强总结 附详细代码">• Web前端:CSS最强总结 附详细代码</a></li><li><a href="https://www.jb51.cc/webfrontend/1012170.html" title="Web前端:JavaScript最强总结 附详细代码 带常用案例!">• Web前端:JavaScript最强总结 附详细代…</a></li><li><a href="https://www.jb51.cc/webfrontend/992748.html" title="糟糕的设计会为我们的工作带来什么启发?">• 糟糕的设计会为我们的工作带来什么启发…</a></li><li><a href="https://www.jb51.cc/webfrontend/992747.html" title="想实现多人协作的“在线Excel”?真没那么简单">• 想实现多人协作的“在线Excel”?真没那…</a></li><li><a href="https://www.jb51.cc/webfrontend/992746.html" title="怎样使我们的用户不再抵触填写Form表单?">• 怎样使我们的用户不再抵触填写Form表单…</a></li><li><a href="https://www.jb51.cc/webfrontend/992745.html" title="不要再造轮子了:聊一聊 JavaScript 的 URL 对象是什么?">• 不要再造轮子了:聊一聊 JavaScript 的…</a></li><li><a href="https://www.jb51.cc/webfrontend/992744.html" title="Deno会在短期内取代Node吗?">• Deno会在短期内取代Node吗?</a></li></ul> </div> </div> </div> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <label class="main-content-label ">最新文章</label> <ul class="n-list"><li><a href="https://www.jb51.cc/webfrontend/1187915.html" title="使用input+datalist简单实现实时匹配的可编辑下拉列表-并解决选定后浏览器默认只显示value的可读性问题">• 使用input+datalist简单实现实时匹配的…</a></li><li><a href="https://www.jb51.cc/webfrontend/1178240.html" title="前端js生成任意随机数">• 前端js生成任意随机数</a></li><li><a href="https://www.jb51.cc/webfrontend/1012172.html" title="Web前端:HTML最强总结 附详细代码">• Web前端:HTML最强总结 附详细代码</a></li><li><a href="https://www.jb51.cc/webfrontend/1012171.html" title="Web前端:CSS最强总结 附详细代码">• Web前端:CSS最强总结 附详细代码</a></li><li><a href="https://www.jb51.cc/webfrontend/1012170.html" title="Web前端:JavaScript最强总结 附详细代码 带常用案例!">• Web前端:JavaScript最强总结 附详细代…</a></li><li><a href="https://www.jb51.cc/webfrontend/992748.html" title="糟糕的设计会为我们的工作带来什么启发?">• 糟糕的设计会为我们的工作带来什么启发…</a></li><li><a href="https://www.jb51.cc/webfrontend/992747.html" title="想实现多人协作的“在线Excel”?真没那么简单">• 想实现多人协作的“在线Excel”?真没那…</a></li><li><a href="https://www.jb51.cc/webfrontend/992746.html" title="怎样使我们的用户不再抵触填写Form表单?">• 怎样使我们的用户不再抵触填写Form表单…</a></li><li><a href="https://www.jb51.cc/webfrontend/992745.html" title="不要再造轮子了:聊一聊 JavaScript 的 URL 对象是什么?">• 不要再造轮子了:聊一聊 JavaScript 的…</a></li><li><a href="https://www.jb51.cc/webfrontend/992744.html" title="Deno会在短期内取代Node吗?">• Deno会在短期内取代Node吗?</a></li></ul> </div> </div> </div> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <label class="main-content-label ">热门标签<a href="https://www.jb51.cc/all" class="pull-right">更多</a> </label> <div class="topcard-tags"><a href="https://www.jb51.cc/tag/python/" title="python">python</a><a href="https://www.jb51.cc/tag/JavaScript/" title="JavaScript">JavaScript</a><a href="https://www.jb51.cc/tag/java/" title="java">java</a><a href="https://www.jb51.cc/tag/HTML/" title="HTML">HTML</a><a href="https://www.jb51.cc/tag/PHP/" title="PHP">PHP</a><a href="https://www.jb51.cc/tag/reactjs/" title="reactjs">reactjs</a><a href="https://www.jb51.cc/tag/C/" title="C#">C#</a><a href="https://www.jb51.cc/tag/Android/" title="Android">Android</a><a href="https://www.jb51.cc/tag/CSS/" title="CSS">CSS</a><a href="https://www.jb51.cc/tag/Nodejs/" title="Node.js">Node.js</a><a href="https://www.jb51.cc/tag/sql/" title="sql">sql</a><a href="https://www.jb51.cc/tag/rp/" title="r">r</a><a href="https://www.jb51.cc/tag/python3x/" title="python-3.x">python-3.x</a><a href="https://www.jb51.cc/tag/MysqL/" title="MysqL">MysqL</a><a href="https://www.jb51.cc/tag/jQuery/" title="jQuery">jQuery</a><a href="https://www.jb51.cc/tag/c4343/" title="c++">c++</a><a href="https://www.jb51.cc/tag/pandas/" title="pandas">pandas</a><a href="https://www.jb51.cc/tag/flutter/" title="Flutter">Flutter</a><a href="https://www.jb51.cc/tag/angular/" title="angular">angular</a><a href="https://www.jb51.cc/tag/IOS/" title="IOS">IOS</a><a href="https://www.jb51.cc/tag/django/" title="django">django</a><a href="https://www.jb51.cc/tag/linux/" title="linux">linux</a><a href="https://www.jb51.cc/tag/swift/" title="swift">swift</a><a href="https://www.jb51.cc/tag/typescript/" title="typescript">typescript</a><a href="https://www.jb51.cc/tag/luyouqi/" title="路由器">路由器</a><a href="https://www.jb51.cc/tag/JSON/" title="JSON">JSON</a><a href="https://www.jb51.cc/tag/luyouqishezhi/" title="路由器设置">路由器设置</a><a href="https://www.jb51.cc/tag/wuxianluyouqi/" title="无线路由器">无线路由器</a><a href="https://www.jb51.cc/tag/h3c/" title="h3c">h3c</a><a href="https://www.jb51.cc/tag/huasan/" title="华三">华三</a><a href="https://www.jb51.cc/tag/huasanluyouqishezhi/" title="华三路由器设置">华三路由器设置</a><a href="https://www.jb51.cc/tag/huasanluyouqi/" title="华三路由器">华三路由器</a><a href="https://www.jb51.cc/tag/diannaoruanjianjiaocheng/" title="电脑软件教程">电脑软件教程</a><a href="https://www.jb51.cc/tag/arrays/" title="arrays">arrays</a><a href="https://www.jb51.cc/tag/docker/" title="docker">docker</a><a href="https://www.jb51.cc/tag/ruanjiantuwenjiaocheng/" title="软件图文教程">软件图文教程</a><a href="https://www.jb51.cc/tag/C/" title="C">C</a><a href="https://www.jb51.cc/tag/vuejs/" title="vue.js">vue.js</a><a href="https://www.jb51.cc/tag/laravel/" title="laravel">laravel</a><a href="https://www.jb51.cc/tag/springboot/" title="spring-boot">spring-boot</a></div> </div> </div> </div> <div class="row row-sm rbox"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <!-- jb51-article-300x600 --> <ins class="adsbygoogle" style="display:inline-block;width:300px;height:600px" data-ad-client="ca-pub-4605373693034661" data-ad-slot="7541177540"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> </div> </div> </div> <footer id="footer"> <div class="container" style="width:1440px;"> <div class="row hidden-xs"> <div class="col-sm-12 col-md-9 col-lg-9 site-link"> <ul class="list-inline"> <li>友情链接:</li><li><a href="https://www.runoob.com/" title="菜鸟教程(www.runoob.com)提供了编程的基础技术教程, 介绍了HTML、CSS、Javascript、Python,Java,Ruby,C,PHP , MySQL等各种编程语言的基础知识。 同时本站中也提供了大量的在线实例,通过实例,您可以更好的学习编程。" target="_blank" rel="nofollow">菜鸟教程</a></li><li><a href="https://ai.jb51.cc/" title="ai导航是编程之家旗下ai方向的ai资讯、ai工具类集合导航站。" target="_blank" rel="nofollow">ai导航</a></li></ul> <ul class="list-inline"> <li><a href="https://www.jb51.cc" title="编程之家">编程之家</a></li>-<li><a href="https://t5m44pq3f7.jiandaoyun.com/f/638ca61b7b079a000a5d2dd6" rel="nofollow" title="我要投稿" target="_blank">我要投稿</a></li>-<li><a target="_blank" rel="nofollow" href="https://t5m44pq3f7.jiandaoyun.com/f/638ca8c69ad234000a79561f" title="广告合作">广告合作</a></li>-<li><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=76874919&site=qq&menu=yes">联系我们</a></li>-<li><a href="https://www.jb51.cc/disclaimers.html" title="免责声明">免责声明</a></li>-<li><a href="https://www.jb51.cc/sitemap/all/index.xml" title="网站地图" target="_blank">网站地图</a></li> </ul> <div>版权所有 © 2018编程之家<a href="https://beian.miit.gov.cn/" target="_blank" rel="nofollow">闽ICP备13020303号-8</a> </div> </div> <div class="col-sm-12 col-md-3 col-lg-3"><img src="https://www.jb51.cc/qrcode.jpg" width="90" alt="微信公众号搜索 “ 程序精选 ” ,选择关注!"> <div class="pull-right">微信公众号搜<span class="text-danger">"程序精选"</span>关注<br />微信扫一扫可直接关注哦!</div> </div> </div> </div> </footer> <script src="https://www.jb51.cc/js/count.js"></script> </body> </html>