自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(34)
  • 收藏
  • 关注

原创 Centos7安装Docker容器详细步骤

centos7安装docker详细步骤

2022-12-05 16:40:28 1593 1

原创 MyBatis批量插入的五种方式,哪种最强?

MyBatis批量插入的五种方式,哪种最强?

2022-12-05 10:35:32 386

原创 数据三级分类(树形结构、递归)

【代码】数据三级分类(树形结构、递归)

2022-12-02 16:14:53 858

原创 删除 文件

/** * 删除空目录 * * @param dir 将要删除的目录路径 */ public static void deleteEmptyDir(String dir) { boolean success = (new File(dir)).delete(); if (success) { System.out.println("Successfully deleted empty direct...

2021-11-17 09:58:01 267

原创 启动CMD

启动CMDpublic CommonResult startCMD(CommonResult result, ProcessBuilder processBuilder) { try { //启动进程 Process start = processBuilder.start(); //获取输入流 InputStream inputStream = start.getInputStream(); //转成字符输入流

2021-11-17 09:54:57 206

原创 压缩视频文件

/** * 传视频File对象,返回压缩后File对象信息 * * @param source */ public File compressionVideo(File source) { if (source == null) { return null; } File dirFile = new File(uploadPicturePath); if (!dir...

2021-10-09 09:12:02 88

原创 读取Excel文件

public Response<String> readWzExcel(MultipartFile file) { //文件存在判断 if (file == null) { return Response.fail("请选择文件"); } //文件名称 String filename = file.getOriginalFilename(); Workbook exc...

2021-10-09 09:08:43 70

原创 读取txt文件

public Response<String> readWzTxt(MultipartFile file) { List<String> list = new ArrayList<>(); if (file != null) { try { BufferedReader br = new BufferedReader(new InputStreamReader(file.get...

2021-10-09 09:07:53 219

原创 文件-下载

/** *@Description: 文件下载 *@Params: *@Return: */ public static HttpServletResponse downLoadFile(String path,HttpServletResponse response) { try { // path是指下载的文件的路径。 File file = new File(path); ...

2021-10-09 08:58:02 61

原创 文件-上传

/** * @param file 文件 * @param path 文件存放路径 * @param fileName 保存的文件名 * @return */ public static boolean upload(MultipartFile file, String path, String fileName) { //确定上传的文件名 Path realPath = Paths.get(p...

2021-10-09 08:56:43 68

原创 html转Pdf[包含文件上传]

/** * @param mess 富文本编辑器里的html信息 * @param fileName 文件名 * @return * @description html转Pdf[文件上传] */ public String htmlToPdfUpload(String mess, String fileName) throws IOException { // 每次根据时间创建文件夹,作为文件和压缩文件保存目录 ...

2021-10-09 08:54:01 124

原创 流方式获取照片

public byte[] lookRwqdPicture(Integer id) throws IOException { CheckPicture pic = checkPictureServiceImpl.getById(id); if (!ObjectUtils.isEmpty(pic.getName())) { Path path = Paths.get(pic.getZpfwqlj(), pic.getName()); ...

2021-10-09 08:50:11 75

原创 秒懂JSONArray和JSONObject的区别和使用

一.JSONObject是什么?就是对象json;之前在秒懂json中说过,{}表示对象,所以JSONObject就是:{“name”:“tom”}同时,这里的对象Json通过添加数组json可以变成对象数组json:{“name”:[“tome”,“kate”]}例如:JSONObject jsono = new JSONObject();JSONArray jsona = new JSONArray();jsona.put("tom");jsona.put("kate");

2021-09-29 16:58:48 239

原创 java汉字转成拼音

public static void getPinyin(String text, String separator) {// String text = "你好";// String separator = " "; char[] chars = text.toCharArray(); HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat(); // ...

2021-09-29 16:41:37 66

转载 当try语句块中存在return语句时,还会执行finally吗

其实在java官方文档中有描述,当try语句块执行结束后是一定会执行finally的。因此一般情况下在finally中做一些关闭流的操作,因为try中的return,break,continue等都影响不到它,那么到底是怎么执行return又执行finally的呢,看代码:public class Test01 { public static void main(String[] args) { int a = 0; System.out.println(add(a)); } public

2021-09-29 16:34:47 451

转载 nginx------所有的http协议重定向到https协议

转载自:https://blog.csdn.net/COCOLI_BK/article/details/109116990

2021-09-29 16:30:05 64

转载 服务器------JAVA项目搭建环境变量(jdk和maven配置)

转载自: https://blog.csdn.net/COCOLI_BK/article/details/107929188

2021-09-29 16:13:23 77

转载 服务器------linux服务器命令使用总结(实时更新)

转载自:https://blog.csdn.net/COCOLI_BK/article/details/104818854

2021-09-29 16:10:29 66

转载 nginx------nginx通过yum直接安装

转载自:https://blog.csdn.net/COCOLI_BK/article/details/107509856

2021-09-28 09:31:10 54

转载 服务器------nginx部署静态网页html配置文件,搭建Http静态服务器环境

转载自:https://blog.csdn.net/COCOLI_BK/article/details/106014909

2021-09-28 09:30:28 390

转载 服务器-------nginx: [error] open() “/usr/local/var/run/nginx.pid“ failed (2: No such file or directory)

转载自:https://blog.csdn.net/COCOLI_BK/article/details/106013937

2021-09-28 09:29:50 116

转载 内网穿透------frp配置(服务端客户端配置)超详细的那种~~~

转载自:https://blog.csdn.net/COCOLI_BK/article/details/105052416

2021-09-28 09:29:06 144

转载 centOS------nginx配置项目时不在/root时,配置自定义根路径

转载自:https://blog.csdn.net/COCOLI_BK/article/details/103038521

2021-09-28 09:27:52 95

转载 centOS--------在配置nginx时最后重启时遇到的问题------配置nginx

转载自:https://blog.csdn.net/COCOLI_BK/article/details/102522956

2021-09-28 09:26:50 64

转载 centOS------打开文件(vi 打开)乱码的解决方案

转载自:https://blog.csdn.net/COCOLI_BK/article/details/102520170

2021-09-28 09:26:10 307

转载 centOS------下载、解压文件

转载自:https://blog.csdn.net/COCOLI_BK/article/details/102519583

2021-09-28 09:25:00 140

转载 centOS------ 重命名文件、文件夹;移动,删除文件、文件夹命令;复制文件、文件夹

转载自:https://blog.csdn.net/COCOLI_BK/article/details/102516624

2021-09-28 09:23:54 1285

转载 CentOS------编辑、修改文件命令

转载自:https://blog.csdn.net/COCOLI_BK/article/details/102516102

2021-09-28 09:22:41 669

原创 解决PostgreSQL远程访问报错could not connect to server

1.先将postgresql服务关闭2.想让postgresql支持远程访问的话需要修改目录下的data文件夹中的两个配置文件postgresql.conf将该文件中的listen_addresses项值设定为 ‘*’pg_hba.conf在该配置文件的ipv4配置后面的host all all 127.0.0.1/32 md5行下添加以下配置,或者直接将这一行修改为以下配置 host all all 0.0.0.0/0 trust如果不希望允许所有IP远程访问,则可

2021-09-14 15:22:15 7112

原创 sringboot配置属性大全

|项目|Value||--|-----||电脑|$1600||手机|$12 ||导管|$1 ||–|-----||电脑|$1600||手机|$12 ||导管|$1 |)

2021-09-14 13:50:20 1125

原创 yml中spring.datasource

spring: datasource: abandon-when-percentage-full: 设定超时被废弃的连接占到多少比例时要被关闭或上报 allow-pool-suspension: 使用Hikari pool时,是否允许连接池暂停,默认为: false alternate-username-allowed: 是否允许替代的用户名. auto-commit: 指定updates是否自动提交. catalog: 指定默认的c

2021-09-14 09:39:07 911

原创 3 种方案解决跨域

前后端分离大势所趋,跨域问题更是老生常谈,随便用标题去google或百度一下,能搜出一大片解决方案,那么为啥又要写一遍呢,不急往下看。问题背景:Same Origin Policy,译为“同源策略”。它是对于客户端脚本(尤其是JavaScript)的重要安全度量标准,其目的在于防止某个文档或者脚本从多个不同“origin”(源)装载。它认为自任何站点装载的信赖内容是不安全的。当被浏览器半信半疑的脚本运行在沙箱时,它们应该只被允许访问来自同一站点的资源,而不是那些来自其它站点可能怀有恶意的资源。注:

2021-09-01 10:05:41 129

转载 文件上传

前后端分离且跨域的情况下form表单提交数据,且数据中包含文件提交上传1.前端用formdata()的方式提交 let form=document.getElementById('form') var param = new FormData(form); let config = { //添加请求头 headers: { 'Content-Type':'multipart/form-data'} }; // 拿到file console.log

2021-08-27 15:07:01 61

原创 记录工作中遇到的一些实例的链接

记录工作中遇到的一些实例的链接:1.Springboot通过EasyExcel向数据库中添加数据,利用EasyExcel将Excel中的数据导入到数据库中。链接:https://www.cnblogs.com/leeeeemz/p/12661452.html若需要官方文件请见 https://alibaba-easyexcel.github.io/quickstart/read.html...

2020-11-13 15:23:55 63

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除