- 博客(10)
- 收藏
- 关注
原创 springboot 策略模式示例
策略接口package com.example.demo.strategy.service;public interface Strategy { String doOperation();}策略实现package com.example.demo.strategy.service.impl;import com.example.demo.strategy.service.Strategy;import org.springframework.stereotype.C
2021-12-28 10:36:07
664
3
原创 JAVA计算文件MD5
public static String getMD5(File file) { try(FileInputStream fileInputStream = new FileInputStream(file)) { MessageDigest MD5 = MessageDigest.getInstance("MD5"); byte[] buffer = new byte[8192]; int length; ...
2021-12-28 10:29:03
1167
原创 JAVA处理 linux颜色控制符
public static void main(String[] args) { String content = "total 12345\n" + "drwxr-xr-x. 6 root root 55 Oct 26 11:08 \u001B[0m\u001B[01;34mTest\u001B[0m\n" + "-rw-r--r--. 1 root root 79779840 Oct 26 13:43...
2021-10-26 16:26:25
594
原创 JSONObject.parseObject 之泛型嵌套 TypeReference<T>
private <T> T request(String result, TypeReference<T> type) { return JSONObject.parseObject(result, type); } public Result getResult(String result) { return request(result ,new TypeReference<Result>(){}); ...
2021-09-28 15:11:02
12269
2
原创 starVcenter接口汇总整理
package com.example.demo.starvcenter;import com.alibaba.fastjson.JSON;import com.alibaba.fastjson.JSONObject;import com.alibaba.fastjson.TypeReference;import com.example.demo.config.BusinessException;import com.example.demo.starvcenter.vo.StarVcente.
2021-09-28 13:39:27
1196
原创 SpringBoot 使用阿里fastjson进行JSONObject.parseObject反序列化时NULL值处理以及嵌套泛型处理
1. 转换时存在值NULL处理package com.example.demo.config;import com.alibaba.fastjson.serializer.SerializerFeature;import com.alibaba.fastjson.support.config.FastJsonConfig;import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;import com.fas
2021-09-28 13:18:32
4395
原创 达梦数据库-备份及远程还原
1. 确认数据库开启归档模式 登录cmd: [dmdba@localhost ~]$cd /home/dmdba/dmdbms/bin;./disql SYSDBA/SYSDBA@127.0.0.1:5236 1)修改数据库为 MOUNT 状态。 SQL>ALTER DATABASE MOUNT; 2)配置本地归档。 SQL>ALTER DATABASE ADD ARCHIVELOG 'DEST ...
2021-09-06 11:24:44
567
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人