uniapp android 原生插件开发-测试流程

前言

最近公司要求研究一下 uniapp 的 android 原生插件的开发,为以后的工作做准备。这篇文章记录一下自己的学习过程,也帮助一下有同样需求的同学们 : )


一、下载安装Hbuilder X , Android studio(相关的安装配置过程网上有很多,在这里就不再赘述,具体配置要求也可以访问官网查看Android 插件开发教程)

二、开发步骤

1.下载uniapp 的Android 离线SDK(可以前往官网链接下载Android 离线SDK)

下载后得到压缩包

2.android studio 导入工程

解压压缩包 ,使用android studio 导入压缩包中的UniPlugin-Hello-AS项目

导入后目录结构为

然后就可以开始我们的开发之旅了

3.新建module项目


选择 Android Library 输入你的插件名称 点击finish

将app目录下的libs中的uniapp-v8-release.aar复制到你创建的module目录下的libs中(我创建的是xiaohu_TestModule,后面都用xiaohu_TestModule讲解)
在这里插入图片描述

打开你创建的xiaohu_TestModule目录下的build.gradle
修改依赖为

<span style="color:rgba(0, 0, 0, 0.75)"><span style="color:#000000"><span style="background-color:#282c34"><code class="language-java">dependencies <span style="color:#999999">{</span>compileOnly <span style="color:#61aeee">fileTree</span><span style="color:#999999">(</span>dir<span style="color:#669900">:</span> <span style="color:#669900">'libs'</span><span style="color:#999999">,</span> include<span style="color:#669900">:</span> <span style="color:#999999">[</span><span style="color:#669900">'*.jar'</span><span style="color:#999999">]</span><span style="color:#999999">)</span>compileOnly <span style="color:#61aeee">fileTree</span><span style="color:#999999">(</span>dir<span style="color:#669900">:</span> <span style="color:#669900">'libs'</span><span style="color:#999999">,</span> include<span style="color:#669900">:</span> <span style="color:#999999">[</span><span style="color:#669900">'uniapp-v8-release.aar'</span><span style="color:#999999">]</span><span style="color:#999999">)</span>compileOnly <span style="color:#669900">'androidx.legacy:legacy-support-v4:1.0.0'</span>compileOnly <span style="color:#669900">'androidx.appcompat:appcompat:1.0.0'</span>compileOnly <span style="color:#669900">'androidx.recyclerview:recyclerview:1.0.0'</span><span style="color:#5c6370">//下面的可以删除</span><span style="color:#5c6370">/*implementation 'androidx.appcompat:appcompat:1.2.0'implementation 'com.google.android.material:material:1.2.1'testImplementation 'junit:junit:4.+'androidTestImplementation 'androidx.test.ext:junit:1.1.2'androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'*/</span>
<span style="color:#999999">}</span>
</code></span></span></span>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17

然后module就配置完了,然后就是android 的开发工作
下面是一个简单的示例。

新建类AndroidDialog 继承UniModule(示例是调用android原生的系统弹窗)

在这里插入图片描述
然后在AndroidDialog内写上自己的代码

<span style="color:rgba(0, 0, 0, 0.75)"><span style="color:#000000"><span style="background-color:#282c34"><code class="language-java"><span style="color:#c678dd">package</span> com<span style="color:#999999">.</span>xiaohu<span style="color:#999999">.</span>xiaohu_testmodule<span style="color:#999999">;</span><span style="color:#c678dd">import</span> android<span style="color:#999999">.</span>app<span style="color:#999999">.</span>Activity<span style="color:#999999">;</span>
<span style="color:#c678dd">import</span> android<span style="color:#999999">.</span>content<span style="color:#999999">.</span>DialogInterface<span style="color:#999999">;</span>
<span style="color:#c678dd">import</span> android<span style="color:#999999">.</span>util<span style="color:#999999">.</span>Log<span style="color:#999999">;</span>
<span style="color:#c678dd">import</span> android<span style="color:#999999">.</span>widget<span style="color:#999999">.</span>Toast<span style="color:#999999">;</span><span style="color:#c678dd">import</span> androidx<span style="color:#999999">.</span>appcompat<span style="color:#999999">.</span>app<span style="color:#999999">.</span>AlertDialog<span style="color:#999999">;</span><span style="color:#c678dd">import</span> com<span style="color:#999999">.</span>taobao<span style="color:#999999">.</span>weex<span style="color:#999999">.</span>annotation<span style="color:#999999">.</span>JSMethod<span style="color:#999999">;</span>
<span style="color:#c678dd">import</span> com<span style="color:#999999">.</span>taobao<span style="color:#999999">.</span>weex<span style="color:#999999">.</span>bridge<span style="color:#999999">.</span>JSCallback<span style="color:#999999">;</span><span style="color:#c678dd">import</span> java<span style="color:#999999">.</span>util<span style="color:#999999">.</span>Map<span style="color:#999999">;</span><span style="color:#c678dd">import</span> io<span style="color:#999999">.</span>dcloud<span style="color:#999999">.</span>feature<span style="color:#999999">.</span>uniapp<span style="color:#999999">.</span>common<span style="color:#999999">.</span>UniModule<span style="color:#999999">;</span><span style="color:#c678dd">public</span> <span style="color:#c678dd">class</span> AndroidDialog <span style="color:#c678dd">extends</span> UniModule <span style="color:#999999">{</span><span style="color:#5c6370">/*** 调用原生Dialog显示*/</span><span style="color:#999999">@JSMethod</span><span style="color:#999999">(</span>uiThread <span style="color:#669900">=</span> <span style="color:#56b6c2">true</span><span style="color:#999999">)</span>   <span style="color:#5c6370">//必须加上注释,不然uniapp无法调用</span><span style="color:#c678dd">public</span> <span style="color:#c678dd">void</span> <span style="color:#61aeee">showDialog</span><span style="color:#999999">(</span>JSCallback jsCallback<span style="color:#999999">)</span> <span style="color:#999999">{</span>    <span style="color:#5c6370">//需为pulic</span><span style="color:#c678dd">if</span> <span style="color:#999999">(</span>mWXSDKInstance <span style="color:#669900">!=</span> <span style="color:#c678dd">null</span> <span style="color:#669900">&&</span> mWXSDKInstance<span style="color:#999999">.</span><span style="color:#61aeee">getContext</span><span style="color:#999999">(</span><span style="color:#999999">)</span> <span style="color:#c678dd">instanceof</span> Activity<span style="color:#999999">)</span> <span style="color:#999999">{</span><span style="color:#c678dd">new</span> AlertDialog<span style="color:#999999">.</span>Builder<span style="color:#999999">(</span>mWXSDKInstance<span style="color:#999999">.</span><span style="color:#61aeee">getContext</span><span style="color:#999999">(</span><span style="color:#999999">)</span><span style="color:#999999">)</span><span style="color:#999999">.</span><span style="color:#61aeee">setTitle</span><span style="color:#999999">(</span><span style="color:#669900">"弹窗"</span><span style="color:#999999">)</span><span style="color:#999999">.</span><span style="color:#61aeee">setMessage</span><span style="color:#999999">(</span><span style="color:#669900">"这是一个测试弹窗"</span><span style="color:#999999">)</span><span style="color:#999999">.</span><span style="color:#61aeee">setPositiveButton</span><span style="color:#999999">(</span><span style="color:#669900">"确定"</span><span style="color:#999999">,</span> <span style="color:#c678dd">new</span> DialogInterface<span style="color:#999999">.</span>OnClickListener<span style="color:#999999">(</span><span style="color:#999999">)</span> <span style="color:#999999">{</span><span style="color:#999999">@Override</span><span style="color:#c678dd">public</span> <span style="color:#c678dd">void</span> <span style="color:#61aeee">onClick</span><span style="color:#999999">(</span>DialogInterface dialog<span style="color:#999999">,</span> <span style="color:#c678dd">int</span> which<span style="color:#999999">)</span> <span style="color:#999999">{</span>jsCallback<span style="color:#999999">.</span><span style="color:#61aeee">invoke</span><span style="color:#999999">(</span><span style="color:#669900">"点击了确定"</span><span style="color:#999999">)</span><span style="color:#999999">;</span><span style="color:#999999">}</span><span style="color:#999999">}</span><span style="color:#999999">)</span><span style="color:#999999">.</span><span style="color:#61aeee">setNegativeButton</span><span style="color:#999999">(</span><span style="color:#669900">"取消"</span><span style="color:#999999">,</span> <span style="color:#c678dd">new</span> DialogInterface<span style="color:#999999">.</span>OnClickListener<span style="color:#999999">(</span><span style="color:#999999">)</span> <span style="color:#999999">{</span><span style="color:#999999">@Override</span><span style="color:#c678dd">public</span> <span style="color:#c678dd">void</span> <span style="color:#61aeee">onClick</span><span style="color:#999999">(</span>DialogInterface dialog<span style="color:#999999">,</span> <span style="color:#c678dd">int</span> which<span style="color:#999999">)</span> <span style="color:#999999">{</span>jsCallback<span style="color:#999999">.</span><span style="color:#61aeee">invoke</span><span style="color:#999999">(</span><span style="color:#669900">"点击了取消"</span><span style="color:#999999">)</span><span style="color:#999999">;</span><span style="color:#999999">}</span><span style="color:#999999">}</span><span style="color:#999999">)</span><span style="color:#999999">.</span><span style="color:#61aeee">show</span><span style="color:#999999">(</span><span style="color:#999999">)</span><span style="color:#999999">;</span><span style="color:#999999">}</span><span style="color:#999999">}</span><span style="color:#5c6370">/*** 调用原生Toast显示传入内容*/</span><span style="color:#999999">@JSMethod</span><span style="color:#999999">(</span>uiThread <span style="color:#669900">=</span> <span style="color:#56b6c2">true</span><span style="color:#999999">)</span><span style="color:#c678dd">public</span> <span style="color:#c678dd">void</span> <span style="color:#61aeee">showToast</span><span style="color:#999999">(</span>String message<span style="color:#999999">)</span> <span style="color:#999999">{</span><span style="color:#c678dd">if</span> <span style="color:#999999">(</span>mWXSDKInstance <span style="color:#669900">!=</span> <span style="color:#c678dd">null</span> <span style="color:#669900">&&</span> mWXSDKInstance<span style="color:#999999">.</span><span style="color:#61aeee">getContext</span><span style="color:#999999">(</span><span style="color:#999999">)</span> <span style="color:#c678dd">instanceof</span> Activity<span style="color:#999999">)</span> <span style="color:#999999">{</span>Toast<span style="color:#999999">.</span><span style="color:#61aeee">makeText</span><span style="color:#999999">(</span>mWXSDKInstance<span style="color:#999999">.</span><span style="color:#61aeee">getContext</span><span style="color:#999999">(</span><span style="color:#999999">)</span><span style="color:#999999">,</span> message<span style="color:#999999">.</span><span style="color:#61aeee">toString</span><span style="color:#999999">(</span><span style="color:#999999">)</span><span style="color:#999999">,</span> Toast<span style="color:#999999">.</span>LENGTH_SHORT<span style="color:#999999">)</span><span style="color:#999999">.</span><span style="color:#61aeee">show</span><span style="color:#999999">(</span><span style="color:#999999">)</span><span style="color:#999999">;</span>Log<span style="color:#999999">.</span><span style="color:#61aeee">e</span><span style="color:#999999">(</span><span style="color:#669900">"调用处理"</span><span style="color:#999999">,</span><span style="color:#669900">"bu显示就bu快乐"</span><span style="color:#999999">)</span><span style="color:#999999">;</span><span style="color:#999999">}</span><span style="color:#999999">}</span>
<span style="color:#999999">}</span></code></span></span></span>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55

到这一个简单的插件就写完了,但是我们肯定要先做一下测试才能发布或者给别人使用

4.调试插件

打开HbuilderX 新建unipp项目 uniTest
在这里插入图片描述
创建完成后的目录结构
在这里插入图片描述
修改index.vue的代码

在这里插入图片描述

<span style="color:rgba(0, 0, 0, 0.75)"><span style="color:#000000"><span style="background-color:#282c34"><code class="language-java"><span style="color:#999999"><</span>template<span style="color:#999999">></span><span style="color:#669900"><</span>view <span style="color:#c678dd">class</span><span style="color:#669900">=</span><span style="color:#669900">"content"</span><span style="color:#669900">></span><span style="color:#669900"><</span>view <span style="color:#c678dd">class</span><span style="color:#669900">=</span><span style="color:#669900">"button1"</span><span style="color:#669900">></span><span style="color:#669900"><</span>button <span style="color:#999999">@click</span><span style="color:#669900">=</span><span style="color:#669900">"showDialog(message)"</span><span style="color:#669900">></span>点击显示原生Dialog<span style="color:#669900"><</span><span style="color:#669900">/</span>button<span style="color:#669900">></span><span style="color:#669900"><</span><span style="color:#669900">/</span>view<span style="color:#669900">></span><span style="color:#669900"><</span><span style="color:#669900">/</span>view<span style="color:#669900">></span>
<span style="color:#669900"><</span><span style="color:#669900">/</span>template<span style="color:#669900">></span><span style="color:#999999"><</span>script<span style="color:#999999">></span><span style="color:#c678dd">const</span> AndroidDialogModule <span style="color:#669900">=</span> uni<span style="color:#999999">.</span><span style="color:#61aeee">requireNativePlugin</span><span style="color:#999999">(</span><span style="color:#669900">"AndroidDialog"</span><span style="color:#999999">)</span>export <span style="color:#c678dd">default</span> <span style="color:#999999">{</span><span style="color:#61aeee">data</span><span style="color:#999999">(</span><span style="color:#999999">)</span> <span style="color:#999999">{</span><span style="color:#999999">}</span><span style="color:#999999">,</span><span style="color:#61aeee">onLoad</span><span style="color:#999999">(</span><span style="color:#999999">)</span> <span style="color:#999999">{</span><span style="color:#999999">}</span><span style="color:#999999">,</span>methods<span style="color:#669900">:</span> <span style="color:#999999">{</span><span style="color:#61aeee">showDialog</span><span style="color:#999999">(</span>message<span style="color:#999999">)</span> <span style="color:#999999">{</span>AndroidDialogModule<span style="color:#999999">.</span><span style="color:#61aeee">showDialog</span><span style="color:#999999">(</span>processokdata <span style="color:#669900">=</span><span style="color:#669900">></span> <span style="color:#999999">{</span>AndroidDialogModule<span style="color:#999999">.</span><span style="color:#61aeee">showToast</span><span style="color:#999999">(</span>processokdata<span style="color:#999999">)</span><span style="color:#999999">}</span><span style="color:#999999">)</span><span style="color:#999999">}</span><span style="color:#999999">,</span><span style="color:#999999">}</span><span style="color:#999999">}</span>
<span style="color:#669900"><</span><span style="color:#669900">/</span>script<span style="color:#669900">></span><span style="color:#999999"><</span>style<span style="color:#999999">></span><span style="color:#999999">.</span>button1 <span style="color:#999999">{</span>display<span style="color:#669900">:</span> flex<span style="color:#999999">;</span>margin<span style="color:#669900">-</span>top<span style="color:#669900">:</span> <span style="color:#98c379">200</span>rpx<span style="color:#999999">;</span>margin<span style="color:#669900">-</span>left<span style="color:#669900">:</span> auto<span style="color:#999999">;</span>margin<span style="color:#669900">-</span>right<span style="color:#669900">:</span> auto<span style="color:#999999">;</span>flex<span style="color:#669900">-</span>direction<span style="color:#669900">:</span> column<span style="color:#999999">;</span>align<span style="color:#669900">-</span>items<span style="color:#669900">:</span> center<span style="color:#999999">;</span>justify<span style="color:#669900">-</span>content<span style="color:#669900">:</span> center<span style="color:#999999">;</span><span style="color:#999999">}</span>
<span style="color:#669900"><</span><span style="color:#669900">/</span>style<span style="color:#669900">></span>
</code></span></span></span>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38

打包为本地资源
在这里插入图片描述
编译完成后会返回文件存放地址
在这里插入图片描述
将打包得到的文件夹名称是__UNI__24505A6(类似这样的)
在这里插入图片描述复制到android 项目中的app/src/main/assets/apps下
在这里插入图片描述
将同目录下data文件夹中的dcloud_control文件中的appid改为你复制的文件夹名称
在这里插入图片描述

在dcloud_uniplugins.json中添加插件配置
在这里插入图片描述
最后还需要配置两个文件

  1. app目录下的AndroidMainfest.xml中需要配置uniapp的key值,可以从dcloud的开发者平台配置获取,这个很简单就不在说了。
    在这里插入图片描述
  2. 在app目录下的build.gradle中依赖你写的module
    在这里插入图片描述

到这里一个简单的原生插件就开发完成了,运行到手机或者模拟器就能得到你的成果了
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

官网  简介 | uni小程序SDK

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/706702.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

安全运营中心(SOC)综合指南

什么是安全运营中心&#xff08;SOC&#xff09; 安全运营中心&#xff0c;也称为信息安全运营中心 &#xff08;ISOC&#xff09;&#xff0c;是结构良好的网络安全战略的核心。安全运营中心是一个集中式枢纽&#xff0c;无论是在组织内部还是外包&#xff0c;都致力于对整个…

云计算时代的运维: 职业发展方向与岗位选择

✨✨ 欢迎大家来访Srlua的博文&#xff08;づ&#xffe3;3&#xffe3;&#xff09;づ╭❤&#xff5e;✨✨ &#x1f31f;&#x1f31f; 欢迎各位亲爱的读者&#xff0c;感谢你们抽出宝贵的时间来阅读我的文章。 我是Srlua&#xff0c;在这里我会分享我的知识和经验。&#x…

Nginx网络服务五-----rewrite和反向代理

1.rewrite 1.1rewrite指令 通过正则表达式的匹配来改变URI&#xff0c;可以同时存在一个或多个指令&#xff0c;按照顺序依次对URI进行匹配&#xff0c;rewrite主要是针对用户请求的URL或者是URI做具体处理 官方文档&#xff1a; https://nginx.org/en/docs/http/ngx_http_r…

自动驾驶消息传输机制-LCM

需要用到LCM消息通讯&#xff0c;遂研究下。 这里写目录标题 1 LCM简介2. LCM源码分析3 LCM C教程与实例3.1 安装配置及介绍3.2 创建类型定义3.3 初始化LCM3.4 发布publish一个消息3.5 订阅和接收一个消息3.6 LCM进程间通讯3.7 注意事项&#xff1f;3.7.1 当数据结构定义的是数…

代码随想录算法训练营29期|day64 任务以及具体安排

第十章 单调栈part03 有了之前单调栈的铺垫&#xff0c;这道题目就不难了。 84.柱状图中最大的矩形class Solution {int largestRectangleArea(int[] heights) {Stack<Integer> st new Stack<Integer>();// 数组扩容&#xff0c;在头和尾各加入一个元素int [] ne…

斯元Z-ONE-China Cybersecurity Tech Landscape·中国网络安全全景图-百度网盘下载

面向全球&#xff0c;斯元Z-ONE正式发布首版「China Cybersecurity Tech Landscape中国网络安全全景图」。 为了提升海外市场对中国网络安全行业的全局认识&#xff0c;方便国际客户及合作伙伴了解中国网络安全科技的赛道分布和国内外厂商对标&#xff0c;助力中国网安厂商出海…

uni-app之android原生插件开发

官网 uni小程序SDK 一 插件简介 1.1 当HBuilderX中提供的能力无法满足App功能需求&#xff0c;需要通过使用Andorid/iOS原生开发实现时&#xff0c;可使用App离线SDK开发原生插件来扩展原生能力。 1.2 插件类型有两种&#xff0c;Module模式和Component模式 Module模式&…

【架构笔记1】剃刀思维-如无必要,勿增实体

欢迎来到文思源想的架构空间&#xff0c;前段时间博主做了一个工作经历复盘&#xff0c;10年开发路&#xff0c;走了不少弯路&#xff0c;也算积累了不少软件开发、架构设计的经验和心得&#xff0c;确实有必要好好盘一盘&#xff0c;作为个人的总结&#xff0c;同时也留给有缘…

Flink SQL 中的流式概念:状态算子

博主历时三年精心创作的《大数据平台架构与原型实现&#xff1a;数据中台建设实战》一书现已由知名IT图书品牌电子工业出版社博文视点出版发行&#xff0c;点击《重磅推荐&#xff1a;建大数据平台太难了&#xff01;给我发个工程原型吧&#xff01;》了解图书详情&#xff0c;…

10W 音频功率放大电路芯片TDA2003,可用于汽车收音机及收录机中作音频功率放大器,内部具有短路保护和过热保护等功能

TDA2003 用于汽车收音机及收录机中作音频功率放大器。 采用 TO220B5 封装形式。 主要特点&#xff1a; ⚫ 内部具有短路保护和过热保护。内部具有地线开路、电源极性接 反和负载泄放电压反冲等保护电路。 ⚫ 输出电流大。 ⚫ 负载电阻可低至 1.6 。 …

LeetCode 刷题 [C++] 第141题.环形链表

题目描述 给你一个链表的头节点 head &#xff0c;判断链表中是否有环。 如果链表中有某个节点&#xff0c;可以通过连续跟踪 next 指针再次到达&#xff0c;则链表中存在环。 为了表示给定链表中的环&#xff0c;评测系统内部使用整数 pos 来表示链表尾连接到链表中的位置&a…

STC-ISP原厂代码研究之 V3.7d汇编版本

最近在研究STC的ISP程序,用来做一个上位机烧录软件,逆向了上位机软件,有些地方始终没看明白,因此尝试读取它的ISP代码,但是没有读取成功。应该是目前的芯片架构已经将引导代码放入在了单独的存储块中,而这存储块有硬件级的使能线,在面包板社区-宏晶STC单片机的ISP的BIN文…

matlab绘制雷达图和二维FFT变换图

1、内容简介 略 49-可以交流、咨询、答疑 matlab绘制雷达图和二维FFT变换图 NMO组及NORMAL组 RNFL层、GCL层、IPL层、GCC层、ORL层做雷达图&#xff08;共10张&#xff09; 2、内容说明 略 NMO组及NORMAL组 RNFL层、GCL层、IPL层、GCC层、ORL层请分别做雷达图&#xff08…

kotlin与java的相互转换

Kotlin转java 将kotlin代码反编译成java Tools -> Kotlin -> Show Kotlin Bytecode 然后点击 【Decompile】 生成java代码 java转kotlin Code -> Convert Java File To Kotlin File

科技论文编写思路

科技论文编写思路 1.基本框架2.课题可行性评估1.研究目标和意义2.研究方法和技术3.可行性和可操作性4.风险和不确定性5.经济性和资源投入6.成果预期和评估 3.写作思路4.利用AI读论文5.实验流程 1.基本框架 IntroductionRelated worksMethodExperiment and analysisDiscussionC…

ElasticSearch之Search Template和Index Alias

写在前面 本文看下es的search template和index alias。 1&#xff1a;search template 用来定义模板查询语句&#xff0c;运行时只需要将要查询的内容作为参数传进来即可&#xff0c;如下&#xff1a; 接着来测试下&#xff0c;首先来定义数据&#xff1a; DELETE tmdb/ P…

解决i18n国际化可读性问题,傻瓜式webpack中文支持国际化插件开发

先来看最后的效果 问题 用过国际化i18n的朋友都知道&#xff0c;天下苦国际化久矣&#xff0c;尤其是中文为母语的开发者&#xff0c;在面对代码中一堆的$t(abc.def)这种一点也不直观毫无可读性的代码&#xff0c;根本不知道自己写了啥 &#xff08;如上图&#xff0c;你看得出…

Swagger3 使用详解

Swagger3 使用详解 一、简介1 引入依赖2 开启注解3 增加一个测试接口4 启动服务报错1.5 重新启动6 打开地址&#xff1a;http://localhost:8093/swagger-ui/index.html 二、Swagger的注解1.注解Api和ApiOperation2.注解ApiModel和ApiModelProperty3.注解ApiImplicitParams和Api…

大数据职业技术培训包含哪些

技能提升认证考试&#xff0c;旨在通过优化整合涵盖学历教育、职业资格、技术水平和高新技术培训等各种教育培训资源&#xff0c;通过大数据行业政府引导&#xff0c;推进教育培训的社会化&#xff0c;开辟教育培训新途径&#xff0c;围绕大数据技术人才创新能力建设&#xff0…

java特殊文件、日志技术、多线程

一、属性文件 1.1 特殊文件概述 像这种普通的文本文件&#xff0c;没有任何规律可言&#xff0c;不方便程序对文件中的数据信息处理。 在以后的Java开发过程中还会遇到一些特殊的文本文件&#xff0c;这些文件是有一些格式要求的&#xff0c;方便程序对文件中的数据进行处理。…