- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 linux 关闭进程脚本
linux 关闭进程脚本说明代码 说明 在写完 start.sh 脚本的时候, 很经常的 需要重启服务器,就需要关闭服务器再启动, 一般的就是 按照 命令ps -ef |grep java … 去找到对应的进程号 在kill -9 ${proid}, 很烦… 下面的代码 就实现了 自己写一个shutdown 关闭进程 具体的逻辑为 ps -ef |grep ${关键字} 找出自己程序可以唯一找...
2019-04-25 17:00:35
2327
原创 React hook vs class
react hook vs class 对比react-hooks 介绍react class componenthooks 的感受示例React class Component 模式React hooks 模式总结 react-hooks 介绍 没啥可介绍的,react-hooks 介绍 react class component 以前的生命周期写法 写发就是 export default...
2019-04-22 15:27:55
3615
原创 java lambda 语法糖 使用
Lambda 语法糖lambda介绍startlambda 双引号(::)介绍 lambda 介绍 算了, 没啥可介绍的。 就-> 的一种写法. start 主要是实现@FunctionalInterface 注解,java8 之后 已经有些接口有了@FunctionalInterface 就可以使用lambda 语法糖.例如: java.util.function.Consumer、j...
2019-04-16 15:18:58
1187
原创 Springboot启动后执行某些代码
SpringBoot启动后执行 只需实现2个接口中的其中一个org.springframework.boot.CommandLineRunner or org.springframework.boot.ApplicationRunner import org.springframework.boot.ApplicationArguments; import org.springframewor...
2018-10-18 15:52:22
804
原创 SpringBoot 过滤器@WebFilter
SpringBoot 过滤器1. 代码2. 说明 1. 代码 import org.springframework.stereotype.Component; import javax.servlet.*; import javax.servlet.annotation.WebFilter; import java.io.IOException; @WebFilter(filterName =...
2018-10-18 15:29:22
437
原创 读取war|jar包中指定的文件
读取war|jar包中指定的文件1. 读取war|jar包中指定的文件1.1 获取jar包路径1.2 根据流读取流数据1.3 获取流1.4 最终调用1.5 说明 1. 读取war|jar包中指定的文件 获取jar包路径 根据路径加载jar|war 根据相对路径找出文件 1.1 获取jar包路径 public String getPath() { String classesPath =...
2018-10-18 14:42:22
1618
原创 linux 定期清除日志
linux 定期清除日志1. 方法2. 定义shell脚本2.1 脚本2.1.1 config2.1 说明3. 定义定时任务3.1 脚本3.1.1 clean.crontab3.2 说明3.3 启动定时任务3.4 关闭定时任务附件 1. 方法 定义清除日志目录的shell 脚本 启动linux crontab 定时任务执行脚本 2. 定义shell脚本 2.1 脚本 2.1.1 conf...
2018-10-17 16:28:05
956
linux-定时清除日志
2018-11-09
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅