unity打成aar上传到maven库的工具
需求:
把unity打成aar并上传到maven库
其实就是把前两个博客整合了一下
这里先说eclipse版的
- package com.jinkejoy.build_aar;
- import java.awt.FlowLayout;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import java.io.File;
- import java.io.FileNotFoundException;
- import java.io.IOException;
- import java.io.RandomAccessFile;
- import javax.swing.JButton;
- import javax.swing.JFileChooser;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JOptionPane;
- import javax.swing.JTextField;
- public class EcAarBuildUpload {
- private static final String BUILD_PROJECT_PATH = "./aar-build";
- private static final String UPLOAD_PROJECT_PATH = "./aar-upload";
- private JFrame jFrame;
- private JTextField sourceText;
- private JButton sourceButton;
- private File sourceFile;
- private JTextField sdkText;
- private JButton sdkButton;
- private File sdkFile;
- private JTextField ndkText;
- private JButton ndkButton;
- private File ndkFile;
- private JTextField groupIdText;
- private JTextField aarNameText;
- private JTextField versionText;
- private JButton buildButton;
- private JButton uploadButton;
- public static void main(String[] args) {
- new EcAarBuildUpload();
- }
- public EcAarBuildUpload() {
- openFileWindow();
- }
- private void openFileWindow() {
- jFrame = new JFrame();
- jFrame.setTitle("将android工程打成aar并上传到maven库");
- jFrame.setBounds(500, 500, 700, 250);
- jFrame.setVisible(true);
- FlowLayout layout = new FlowLayout();
- layout.setAlignment(FlowLayout.LEFT);
- //选择文件
- JLabel sourceLabel = new JLabel("工程路径:");
- sourceText = new JTextField(50);
- sourceButton = new JButton("浏览");
- //输出路径
- JLabel sdkLabel = new JLabel("本地sdk路径:");
- sdkText = new JTextField(48);
- sdkButton = new JButton("浏览");
- //sdk
- JLabel ndkLabel = new JLabel("本地ndk路径:");
- ndkText = new JTextField(48);
- ndkButton = new JButton("浏览");
- //上传aar
- JLabel groupIdLabel = new JLabel("aar前缀包名:");
- groupIdText = new JTextField(54);
- JLabel aarNameLabel = new JLabel("aar名称:");
- aarNameText = new JTextField(56);
- JLabel versionLabel = new JLabel("aar版本号:");
- versionText = new JTextField(55);
- buildButton = new JButton("构建aar");
- uploadButton = new JButton("上传aar");
- jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- jFrame.setLayout(layout);
- jFrame.setResizable(false);
- jFrame.add(sourceLabel);
- jFrame.add(sourceText);
- jFrame.add(sourceButton);
- jFrame.add(sdkLabel);
- jFrame.add(sdkText);
- jFrame.add(sdkButton);
- jFrame.add(ndkLabel);
- jFrame.add(ndkText);
- jFrame.add(ndkButton);
- jFrame.add(groupIdLabel);
- jFrame.add(groupIdText);
- jFrame.add(aarNameLabel);
- jFrame.add(aarNameText);
- jFrame.add(versionLabel);
- jFrame.add(versionText);
- jFrame.add(buildButton);
- jFrame.add(uploadButton);
- chooseSourceFile();
- chooseSdkFile();
- chooseNdkFile();
- buildAarButton();
- uploadAarButton();
- getCacheInput();
- }
- private void getCacheInput() {
- sourceText.setText(CacheUtils.getCacheInput("sourcePath"));
- sdkText.setText(CacheUtils.getCacheInput("sdkPath"));
- ndkText.setText(CacheUtils.getCacheInput("ndkPath"));
- groupIdText.setText(CacheUtils.getCacheInput("groupId"));
- aarNameText.setText(CacheUtils.getCacheInput("aarName"));
- versionText.setText(CacheUtils.getCacheInput("version"));
- }
- private void buildAar() {
- if (checkInput()) return;
- CacheUtils.cacheInput(sourceText, sdkText, ndkText, groupIdText, aarNameText, versionText);
- createAsFile();
- findUpdateFile(BUILD_PROJECT_PATH);
- gradleBuildAar();
- }
- private void gradleBuildAar() {
- String command = "cmd /c start gradle clean assembleDebug";
- File cmdPath = new File(BUILD_PROJECT_PATH);
- Runtime runtime = Runtime.getRuntime();
- try {
- Process process = runtime.exec(command, null, cmdPath);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- private void findUpdateFile(String filePath) {
- File file = new File(filePath);
- if (!file.exists()) {
- return;
- }
- File[] files = file.listFiles();
- for (File updateFile : files) {
- if (updateFile.isDirectory()) {
- findUpdateFile(updateFile.getAbsolutePath());
- } else {
- switch (updateFile.getName().toString()) {
- case "build.gradle":
- updateBuildGradle(updateFile.getAbsolutePath());
- break;
- case "AndroidManifest.xml":
- updateManifestFile(updateFile.getAbsolutePath());
- break;
- case "local.properties":
- updateSdkFile(updateFile.getAbsolutePath());
- break;
- case "UnityPlayerActivity.java":
- case "UnityPlayerNativeActivity.java":
- case "UnityPlayerProxyActivity.java":
- updateFile.delete();
- break;
- }
- }
- }
- }
- private void updateSdkFile(String filePath) {
- try {
- RandomAccessFile sdkFile = new RandomAccessFile(filePath, "rw");
- String line;
- long lastPoint = 0;
- while ((line = sdkFile.readLine()) != null) {
- final long point = sdkFile.getFilePointer();
- if (line.contains("sdk.dir")) {
- String s = line.substring(0);
- String sdkStr = sdkText.getText().toString();
- String sdkPan = sdkStr.substring(0, 1);
- sdkStr = sdkStr.substring(1).replace("\\", "\\\\");
- String ndkStr = sdkText.getText().toString();
- String ndkPan = ndkStr.substring(0, 1);
- ndkStr = ndkStr.substring(1).replace("\\", "\\\\");
- String replaceStr = "sdk.dir=" + sdkPan + "\\" + sdkStr + "\n" + "ndk.dir=" + ndkPan + "\\" + ndkStr + "\n ";
- String str = line.replace(s, replaceStr);
- sdkFile.seek(lastPoint);
- sdkFile.writeBytes(str);
- }
- lastPoint = point;
- }
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- private void updateManifestFile(String filePath) {
- try {
- RandomAccessFile manifestFile = new RandomAccessFile(filePath, "rw");
- String line;
- long lastPoint = 0;
- while ((line = manifestFile.readLine()) != null) {
- final long ponit = manifestFile.getFilePointer();
- if (line.contains("<activity") && line.contains("UnityPlayerActivity") && !line.contains("<!--<activity")) {
- String str = line.replace("<activity", "<!--<activity");
- manifestFile.seek(lastPoint);
- manifestFile.writeBytes(str);
- }
- if (line.contains("</activity>") && !line.contains("</activity>-->")) {
- String str = line.replace("</activity>", "</activity>-->\n");
- manifestFile.seek(lastPoint);
- manifestFile.writeBytes(str);
- }
- lastPoint = ponit;
- }
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- private void updateBuildGradle(String filePath) {
- try {
- RandomAccessFile buildGradleFile = new RandomAccessFile(filePath, "rw");
- String line;
- long lastPoint = 0;
- while ((line = buildGradleFile.readLine()) != null) {
- final long ponit = buildGradleFile.getFilePointer();
- if (line.contains("classpath 'com.android.tools.build:gradle")) {
- String s = line.substring(line.indexOf("classpath"));
- String str = line.replace(s, "classpath 'com.android.tools.build:gradle:2.3.0' \n");
- buildGradleFile.seek(lastPoint);
- buildGradleFile.writeBytes(str);
- }
- if (line.contains("com.android.application")) {
- String str = line.replace("'com.android.application'", "'com.android.library' \n");
- buildGradleFile.seek(lastPoint);
- buildGradleFile.writeBytes(str);
- }
- if (line.contains("compileSdkVersion") && !line.contains("compileSdkVersion 25")) {
- String s = line.substring(line.indexOf("compileSdkVersion")).toString();
- String str = line.replace(s, "compileSdkVersion 25\n");
- buildGradleFile.seek(lastPoint);
- buildGradleFile.writeBytes(str);
- }
- if (line.contains("buildToolsVersion") && !line.contains("buildToolsVersion '25.0.2'")) {
- String s = line.substring(line.indexOf("buildToolsVersion")).toString();
- String str = line.replace(s, "buildToolsVersion '25.0.2'\n");
- buildGradleFile.seek(lastPoint);
- buildGradleFile.writeBytes(str);
- }
- if (line.contains("targetSdkVersion") && !line.contains("targetSdkVersion 25")) {
- String s = line.substring(line.indexOf("targetSdkVersion")).toString();
- String str = line.replace(s, "targetSdkVersion 25\n");
- buildGradleFile.seek(lastPoint);
- buildGradleFile.writeBytes(str);
- }
- if (line.contains("applicationId") && !line.contains("//applicationId")) {
- String s = line.substring(line.indexOf("applicationId")).toString();
- String str = line.replace(s, "//" + s + "\n");
- buildGradleFile.seek(lastPoint);
- buildGradleFile.writeBytes(str);
- }
- lastPoint = ponit;
- }
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- private void createAsFile() {
- String sourcePath = sourceText.getText().toString();
- File buildFile = new File(BUILD_PROJECT_PATH);
- String buildProject = buildFile.getAbsolutePath();
- //delete history
- String deletePath = buildProject + "\\app\\src\\main";
- FileUtils.delAllFile(deletePath);
- String buildPath1 = buildProject + "\\build";
- FileUtils.delFolder(buildPath1);
- String buildPath2 = buildProject + "\\app\\build";
- FileUtils.delFolder(buildPath2);
- //assets
- String assets = sourcePath + "\\assets";
- String newAssets = buildProject + "\\app\\src\\main\\assets";
- FileUtils.copyFolder(assets, newAssets);
- //unity-classes.jar
- String unity = sourcePath + "\\libs\\unity-classes.jar";
- String newUnity = buildProject + "\\app\\libs\\unity-classes.jar";
- FileUtils.copyFile(new File(unity), new File(newUnity));
- //libs
- String libs = sourcePath + "\\libs";
- String jniLibs = buildProject + "\\app\\src\\main\\jniLibs";
- FileUtils.copyFolder(libs, jniLibs);
- File jni_unity = new File(jniLibs + "\\unity-classes.jar");
- jni_unity.delete();
- //res
- String res = sourcePath + "\\res";
- String newRes = buildProject + "\\app\\src\\main\\res";
- FileUtils.copyFolder(res, newRes);
- //src
- String src = sourcePath + "\\src";
- String java = buildProject + "\\app\\src\\main\\java";
- FileUtils.copyFolder(src, java);
- //AndroidManifest.xml
- String manifest = sourcePath + "\\AndroidManifest.xml";
- String newManifest = buildProject + "\\app\\src\\main\\AndroidManifest.xml";
- FileUtils.copyFile(new File(manifest), new File(newManifest));
- }
- private void uploadAar() {
- findAarFile(BUILD_PROJECT_PATH);
- gradleUpload();
- }
- private void gradleUpload() {
- String command = "cmd /c start gradlew clean uploadArchives";
- File cmdPath = new File(UPLOAD_PROJECT_PATH);
- Runtime runtime = Runtime.getRuntime();
- try {
- Process process = runtime.exec(command, null, cmdPath);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- private void findAarFile(String filePath) {
- File file = new File(filePath);
- if (!file.exists()) {
- return;
- }
- File[] files = file.listFiles();
- for (File outputFile : files) {
- if (outputFile.isDirectory()) {
- findAarFile(outputFile.getAbsolutePath());
- } else {
- String fileName = outputFile.getName().toString();
- if (fileName.endsWith(".aar")) {
- File aarFile = new File("./" + fileName);
- FileUtils.copyFile(outputFile, aarFile);
- CacheUtils.cacheAar(aarFile.getAbsolutePath());
- }
- }
- }
- }
- private boolean checkInput() {
- if ("".equals(sourceText.getText().toString())) {
- JOptionPane.showMessageDialog(jFrame, "请输入源工程文件路径");
- return true;
- }
- if ("".equals(sdkText.getText().toString())) {
- JOptionPane.showMessageDialog(jFrame, "请输入本地sdk路径");
- return true;
- }
- if ("".equals(ndkText.getText().toString())) {
- JOptionPane.showMessageDialog(jFrame, "请输入本地ndk路径");
- return true;
- }
- if ("".equals(groupIdText.getText().toString())) {
- JOptionPane.showMessageDialog(jFrame, "请输入aar前缀包名");
- return true;
- }
- if ("".equals(aarNameText.getText().toString())) {
- JOptionPane.showMessageDialog(jFrame, "请输入aar名称");
- return true;
- }
- if ("".equals(versionText.getText().toString())) {
- JOptionPane.showMessageDialog(jFrame, "请输入aar版本号");
- return true;
- }
- return false;
- }
- private void buildAarButton() {
- buildButton.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent actionEvent) {
- buildAar();
- }
- });
- }
- private void uploadAarButton() {
- uploadButton.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent actionEvent) {
- uploadAar();
- }
- });
- }
- private void chooseSourceFile() {
- sourceButton.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent actionEvent) {
- JFileChooser chooser = new JFileChooser();
- chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
- chooser.showDialog(new JLabel(), "选择");
- sourceFile = chooser.getSelectedFile();
- sourceText.setText(sourceFile.getAbsolutePath().toString());
- }
- });
- }
- private void chooseSdkFile() {
- sdkButton.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent actionEvent) {
- JFileChooser chooser = new JFileChooser();
- chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
- chooser.showDialog(new JLabel(), "选择");
- sdkFile = chooser.getSelectedFile();
- sdkText.setText(sdkFile.getAbsolutePath().toString());
- }
- });
- }
- private void chooseNdkFile() {
- ndkButton.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent actionEvent) {
- JFileChooser chooser = new JFileChooser();
- chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
- chooser.showDialog(new JLabel(), "选择");
- ndkFile = chooser.getSelectedFile();
- ndkText.setText(ndkFile.getAbsolutePath().toString());
- }
- });
- }
- }
- package com.jinkejoy.build_aar;
- import java.io.File;
- import java.io.FileInputStream;
- import java.io.FileNotFoundException;
- import java.io.FileOutputStream;
- import java.io.IOException;
- import java.util.Iterator;
- import java.util.Map;
- import java.util.Properties;
- import javax.swing.JTextField;
- public class CacheUtils {
- private static final String CACHE_PATH = "./cache-input.properties";
- private static final String AAR_PATH = "./aar-path.properties";
- public static void cacheInput(JTextField sourceText, JTextField sdkText, JTextField ndkText,
- JTextField groupIdText, JTextField aarNameText, JTextField versionText) {
- String cache = "sourcePath=" + sourceText.getText().toString().replace("\\", "\\\\") + "\n" +
- "sdkPath=" + sdkText.getText().toString().replace("\\", "\\\\") + "\n" +
- "ndkPath=" + ndkText.getText().toString().replace("\\", "\\\\") + "\n" +
- "groupId=" + groupIdText.getText().toString().replace("\\", "\\\\") + "\n" +
- "aarName=" + aarNameText.getText().toString().replace("\\", "\\\\") + "\n" +
- "version=" + versionText.getText().toString().replace("\\", "\\\\");
- File cacheFile = new File(CACHE_PATH);
- if (!cacheFile.exists()) {
- try {
- cacheFile.createNewFile();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- try {
- FileOutputStream fop = new FileOutputStream(cacheFile);
- fop.write(cache.getBytes());
- fop.flush();
- fop.close();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- public static void cacheAar(String aarPath) {
- String cache = "aarPath=" + aarPath.replace("\\", "\\\\");
- File cacheFile = new File(AAR_PATH);
- if (!cacheFile.exists()) {
- try {
- cacheFile.createNewFile();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- try {
- FileOutputStream fop = new FileOutputStream(cacheFile);
- fop.write(cache.getBytes());
- fop.flush();
- fop.close();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- public static String getCacheInput(String key) {
- File cacheFile = new File(CACHE_PATH);
- if (cacheFile.exists()) {
- try {
- FileInputStream fip = new FileInputStream(cacheFile);
- Properties properties = new Properties();
- properties.load(fip);
- Iterator<Map.Entry<Object, Object>> iterator = properties.entrySet().iterator();
- while (iterator.hasNext()) {
- Map.Entry<Object, Object> entry = iterator.next();
- if (key.equals(entry.getKey().toString())) {
- return entry.getValue().toString();
- }
- }
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- return "";
- }
- }
- package com.jinkejoy.build_aar;
- import java.io.File;
- import java.io.FileInputStream;
- import java.io.FileNotFoundException;
- import java.io.FileOutputStream;
- import java.io.IOException;
- import java.nio.channels.FileChannel;
- public class FileUtils {
- public static boolean delAllFile(String path) {
- boolean flag = false;
- File file = new File(path);
- if (!file.exists()) {
- return flag;
- }
- if (!file.isDirectory()) {
- return flag;
- }
- String[] tempList = file.list();
- File temp = null;
- for (int i = 0; i < tempList.length; i++) {
- if (path.endsWith(File.separator)) {
- temp = new File(path + tempList[i]);
- } else {
- temp = new File(path + File.separator + tempList[i]);
- }
- if (temp.isFile()) {
- temp.delete();
- }
- if (temp.isDirectory()) {
- delAllFile(path + "/" + tempList[i]);//先删除文件夹里面的文件
- delFolder(path + "/" + tempList[i]);//再删除空文件夹
- flag = true;
- }
- }
- return flag;
- }
- public static void delFolder(String folderPath) {
- try {
- delAllFile(folderPath); //删除完里面所有内容
- String filePath = folderPath;
- filePath = filePath.toString();
- java.io.File myFilePath = new java.io.File(filePath);
- myFilePath.delete(); //删除空文件夹
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- public static void copyFile(File source, File dest) {
- FileChannel inputChannel = null;
- FileChannel outputChannel = null;
- try {
- inputChannel = new FileInputStream(source).getChannel();
- outputChannel = new FileOutputStream(dest).getChannel();
- outputChannel.transferFrom(inputChannel, 0, inputChannel.size());
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- } finally {
- try {
- inputChannel.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- try {
- outputChannel.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
- public static void copyFolder(String oldPath, String newPath) {
- try {
- // 如果文件夹不存在,则建立新文件夹
- (new File(newPath)).mkdirs();
- // 读取整个文件夹的内容到file字符串数组,下面设置一个游标i,不停地向下移开始读这个数组
- File filelist = new File(oldPath);
- String[] file = filelist.list();
- // 要注意,这个temp仅仅是一个临时文件指针
- // 整个程序并没有创建临时文件
- File temp = null;
- for (int i = 0; i < file.length; i++) {
- // 如果oldPath以路径分隔符/或者\结尾,那么则oldPath/文件名就可以了
- // 否则要自己oldPath后面补个路径分隔符再加文件名
- // 谁知道你传递过来的参数是f:/a还是f:/a/啊?
- if (oldPath.endsWith(File.separator)) {
- temp = new File(oldPath + file[i]);
- } else {
- temp = new File(oldPath + File.separator + file[i]);
- }
- // 如果游标遇到文件
- if (temp.isFile()) {
- FileInputStream input = new FileInputStream(temp);
- // 复制并且改名
- FileOutputStream output = new FileOutputStream(newPath
- + "/" + (temp.getName()).toString());
- byte[] bufferarray = new byte[1024 * 64];
- int prereadlength;
- while ((prereadlength = input.read(bufferarray)) != -1) {
- output.write(bufferarray, 0, prereadlength);
- }
- output.flush();
- output.close();
- input.close();
- }
- // 如果游标遇到文件夹
- if (temp.isDirectory()) {
- copyFolder(oldPath + "/" + file[i], newPath + "/" + file[i]);
- }
- }
- } catch (Exception e) {
- System.out.println("复制整个文件夹内容操作出错");
- }
- }
- }
效果图
备注:有时候会出现渲染加载不出来的问题,可以修改下布局的创建顺序,改为创建一个控件就马上加载
unity打成aar上传到maven库的工具的更多相关文章
- aar上传maven库工具
需求:本地aar文件上传到maven库 参考我之前的博客gradle上传本地文件到远程maven库(nexus服务器) 下面是java图形化工具代码 package com.jinkejoy.buil ...
- 用eclipse怎样将本地的项目打成jar包上传到maven仓库
使用maven的项目中,有时需要把本地的项目打成jar包上传到mevan仓库. 操作如下: 前提:pom文件中配置好远程库的地址,否则会报错 1.将maven 中的settings文件配置好用户名和密 ...
- Maven系列(二) -- 将开源库上传到maven仓库私服
前言 之前简单说了下Maven的搭建,现在跟大家说一下如何将自己的aar传到我们新搭建的maven仓库里面,接下来我们就从最基本的新建一个library开始讲述整个流程,话不多说,让我们把愉快的开始吧 ...
- Github开源Java项目(Disconf)上传到Maven Central Repository方法详细介绍
最近我做了一个开源项目 Disconf:Distributed Configuration Management Platform(分布式配置管理平台) ,简单来说,就是为所有业务平台系统管理配置文件 ...
- 多个module实体类集合打一个jar包并上传至远程库
本章内容主要分享多个module中的实体类集合生成到一个jar包中,并且发布到远程库:这里采用maven-assembly-plugin插件的功能来操作打包,内容不长却贴近实战切值得拥有,主要节点内容 ...
- DropzoneJS 可以拖拽上传的js库
介绍 可以拖拽上传的 js库 网址 http://www.dropzonejs.com/ 同类类库 1.jquery.fileupload http://blueimp.github.io/jQu ...
- Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):1、JIRA账号注册
文章目录: Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):1.JIRA账号注册 Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):2.PGP ...
- Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):2、PGP下载安装与密钥生成发布
文章目录: Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):1.JIRA账号注册 Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):2.PGP ...
- Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):3、Maven独立插件安装与settings.xml配置
文章目录: Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):1.JIRA账号注册 Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):2.PGP ...
随机推荐
- 信息摘要算法之六:HKDF算法分析与实现
HKDF是一种特定的键衍生函数(KDF),即初始键控材料的功能,KDF从其中派生出一个或多个密码强大的密钥.在此我们想要描述的是基于HMAC的HKDF. 1.HKDF概述 密钥派生函数(KDF)是密码 ...
- Confluence 6 跟踪你安装中的自定义修改
在 Confluence 中的系统信息(System Information)部分,有一个 修改(Modification)的选项.在这个选项中列出了自你 Confluence 安装以来,你 Conf ...
- Confluence 6 从外部小工具中注册访问
希望从 Confluence 中删除一个小工具,你可以选择小工具边上的 URL ,然后单击删除(Delete). 如果你希望取消订阅一个应用的小工具,你需要删除整个订阅.你不能仅仅删除你订阅中的某一个 ...
- 兼容性很好的纯css圆角
<!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8& ...
- nodejs之crypto加密算法
示例 const crypto = require('crypto'); const hash = crypto.createHash('sha256'); hash.update('some dat ...
- 分布式Dubbo快速入门
目录 Dubbo入门 背景 zookeeper安装 发布Dubbo服务 Dubbo Admin管理 消费Dubbo服务 抽取与依赖版本管理 Dubbo入门 Editor:SimpleWu Dubbo是 ...
- spring boot 解决跨域访问
package com.newings.disaster.shelters.configuration; import org.springframework.context.annotation.B ...
- Intenet 地址
java.net.InetAddress类是java对Ip地址(包括ipv4和ipv6)的高层表示,大多数其他网络类都要用到这个类,包括Socket, ServerSocket, URL, Datag ...
- java----Java的栈,堆,代码,静态存储区的存储顺序和位置
转载:https://blog.csdn.net/zhangbaoanhadoop/article/details/82193497
- Gson将字符串转map时,int默认为double类型
gson能够将json字符串转换成map, 但是在转成map时, 会默认将字符串中的int , long型的数字, 转换成double类型 , 数字会多一个小数点 , 如 1 会转成 1.0 Gs ...