自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 端口占用Identify and stop the process that‘s listening on port 8080 or configure thi

端口查杀在开发的时候,大家应该都遇到过开发软件卡到无法运行,那么只能强制结束进程强制结束的进程,如果是正在运行的项目,项目是非正常结束的,那么再次启动运行项目的时候就会报端口被占用的错误,那么该怎么办呢?找到端口杀掉它(因为上次项目非正常结束,所以端口还是在占用的,导致再次运行报错)Identify and stop the process that’s listening on port 8080 or configure thi如何解决问题呢?windows+r输入cmd并打开在控制台输入

2022-01-22 16:23:16 2724

原创 easyexcel 读取

@Datapublic class importUserPj extends BaseRowModel { @ExcelProperty(value = "工号",index = 0) @NumberFormat(value = "0") private String jobCode; @ExcelProperty(index = 1) private String nickName; @ExcelProperty(index =2) pri

2021-12-23 16:58:33 353

转载 mysql查询json列里面具体的某个属性值

查询一层:SELECT * FROM table WHERE JSON_EXTRACT(request_content, "$.Content") = '1'说明:JSON_EXTRACT(列名,"$.json某个属性")查询多层:SELECT * FROM devices WHERE json_extract(json_extract(json_extract(json_data,"$.lastOperation"),"$.target"),"$.name") = '西门门岗闸机01'..

2021-09-01 17:28:06 552

转载 java正则表达式去除html标签

当我们用ckeditor或其他一些在线文本编辑器的时候 内容里会有很多的标签如下片段:<p><img alt="" src="/img/uploadImg/20131218/0fd741e1-cc75-459c-a8b5-bbaebcfcc637.jpg"style="height:494px; width:460px" /></p> <p>生命的旅途,一程有一程的风景,一程有一程的盛放。打开心灵的窗子,静看时光旖旎着一曲花开花落,用一种看山是山

2021-02-24 15:02:57 235

原创 sql 模糊查询优化

模糊查询优化select * from sys_user where user_name like "%1%" SELECT * FROM sys_user WHERE INSTR(user_name, '1' )>0

2021-01-28 16:04:11 106

原创 MultipartFile 转File

File file1 = new File(cover.getOriginalFilename()); FileUtils.copyInputStreamToFile(cover.getInputStream(), file1); // 会在本地产生临时文件,用完后需要删除 if (file1.exists()) { file1.delete(); } ...

2021-01-04 11:30:15 124

转载 JSONArray转List

1.List转JSONArrayList<T> list = new ArrayList<T>();JSONArray array= JSONArray.parseArray(JSON.toJSONString(list));2.JSONArray转ListJSONArray array = new JSONArray();List<EventColAttr> list = JSONObject.parseArray(array.toJSONString(),

2020-12-14 10:04:02 908

原创 mysql 主键自增不连续

在主键id删除某一条后,再次添加,删除的id不会使用手动设置让自增加开始于设置的值alter table t_enterprise auto_increment = 118```

2020-12-14 09:59:47 118

转载 java.security.InvalidKeyException: Illegal key size错误

新使用了AES的256位密钥加解密,项目上线后发现生产在加密的时候报java.security.InvalidKeyException: Illegal key size错误,而本地和测试环境都是没问题的。产生错误原因:为了数据代码在传输过程中的安全,很多时候我们都会将要传输的数据进行加密,然后等对方拿到后再解密使用。我们在使用AES加解密的时候,在遇到128位密钥加解密的时候,没有进行什么特殊处理;然而,在使用256位密钥加解密的时候,如果不进行特殊处理的话,可能会因为jdk版本的问题出现这个异常jav

2020-12-11 16:11:00 209

转载 java生成二维码

在项目的pom.xml中添加依赖 <dependency> <groupId>com.google.zxing</groupId> <artifactId>core</artifactId> <version>3.3.0</version> </dependency> <dependenc

2020-12-01 15:43:27 123

原创 Mysql 查询排名

(供自己学习)查询全部的排名 SELECT obj_new.user_id as userId, obj_new.study_time as studyTime, obj_new.rownum as rankFROM ( SELECT obj.user_id, obj.study_time, @rownum := @rownum + 1 AS num_tmp,

2020-12-01 11:34:57 80

原创 Mysql Order By 字符串排序

排序时,把相应的字段转换成整型,使用CAST函数,如下:select * from t_live_study ORDER BY CAST(study_time AS UNSIGNED) DESC

2020-12-01 09:32:10 931

原创 redis不操作 过一段时间后 无法发布订阅

供自己学习 @Scheduled(cron = "0/30 * * * * *") public void timer() {// stringRedisTemplate1.opsForValue().get("heartbeat"); String channl = "heartbeat"; stringRedisTemplate1.convertAndSend(channl,"heartbeat"); }做个定时 每30s发布

2020-11-30 17:21:04 652

原创 String类型转换成Map

记录学习String s = "{'key':'value'}";Gson gson = new Gson();Map<String, Long> map = new HashMap<String, Long>();map = gson.fromJson(s, map.getClass());

2020-11-27 11:56:28 392

原创 redis发布订阅

记录学习redis发布订阅1.创建配置类package com.live.server.config;import org.springframework.cache.annotation.EnableCaching;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.d

2020-11-27 11:52:11 70

原创 WebScoket中不能直接@resource来通过spring管理对象

不能直接在websocket类中通过@resource来创建对象需要通过创建静态参数 ,再通过Configuration类中注入第一步创建websocket静态参数@Component@ServerEndpoint("/live-server/liveChat/websocket/{roomId}/{userId}")public class WebSocket { public static LiveService liveService; public static Obje

2020-11-25 11:19:16 474

空空如也

空空如也

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

TA关注的人

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