
开发那些事
文章平均质量分 71
忆丶chen
热爱IT,热爱新技术
展开
-
java进程监控,进程停止,自动启动并企微通知
一、编写监控通知脚本#!/bin/shjarDir="/app/back/sw-system"jarName="sw-system-1.0.0-pro.jar"logFile="/app/back/sw-system/autoMonitorRestart.log"cd ${jarDir}#查看进程是否存在count=$(ps -ef | grep ${jarName} | grep -v "grep")if [ -n "${count}" ];then echo "`da....原创 2022-04-13 17:00:32 · 1397 阅读 · 0 评论 -
java和JavaScript解析数学表达式、动态时间
1、java写法:public class Jse { public static void main(String[] args) throws Exception { String str = "([t1]-[t2])/[t2]"; JSONObject js = new JSONObject().fluentPut("t1", 62).fluentPut("t2", 30); String ex = expCalculate(str, j原创 2021-04-02 10:58:26 · 545 阅读 · 0 评论 -
Java 8 Stream 常用API整理
1、JSONArray 转listJSONArray jsonArray = new JSONArray();List<Order> orderList = jsonArray.stream().map(item -> { JSONObject js= (JSONObject)item; return jsonToEntity(trade);}).collect(Collectors.toList());2、JSONArray 转 mapJS.原创 2021-03-29 09:34:40 · 740 阅读 · 0 评论 -
spring-boot项目使用ulisesbocchio对配置文件敏感信息加密
参考文献github官网地址:https://github.com/ulisesbocchio/jasypt-spring-boot1、添加依赖:maven:<dependency> <groupId>com.github.ulisesbocchio</groupId> <artifactId>jasypt-spring-boot-starter</artifactId> <version>3.原创 2021-02-02 14:33:02 · 5034 阅读 · 3 评论