摘要: 项目使用的springboot版本2.4.10 首先: 在项目resources目录下创建 i18n 文件夹,并创建 messages.properties、messages_zh_CN.properties、messages_en_US.properties messages.properties 阅读全文
posted @ 2021-09-25 15:00 Vincent-Li 阅读(2193) 评论(0) 推荐(0) 编辑
摘要: 1、获取 cpu 高的 进程 pidtop 2、获取cpu高进程的具体线程(cpu 排序: shift + p 内存排序: shift + m )top -Hp [pid] #获取线程pid2printf 0x%x pid2 # 十进制 -> 十六进制 3、使用jstack 获取对应的线程信息jst 阅读全文
posted @ 2021-01-05 21:14 Vincent-Li 阅读(12) 评论(0) 推荐(0) 编辑
摘要: public class ExecutorPool { /** * 线程数(处理器个数) */ private static final Integer CORE_POOL_SIZE = Runtime.getRuntime().availableProcessors(); /** * 线程池最大能 阅读全文
posted @ 2020-06-01 13:43 Vincent-Li 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1、定位错误关键字所在行数 cat -n test.log |grep "查找的错误关键字" 2、得到错误关键字所在行号(假设为第500行),查询错误关键字前后100行数据 cat -n test.log |tail -n +400|head -n 200 (表示从第400行开始往后查询200行数据 阅读全文
posted @ 2018-01-08 18:35 Vincent-Li 阅读(8096) 评论(0) 推荐(0) 编辑
摘要: 查看mysql数据库innodb_flush_log_at_trx_commit : 参考资料:https://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit i 阅读全文
posted @ 2017-09-06 14:37 Vincent-Li 阅读(1611) 评论(0) 推荐(0) 编辑
摘要: 原作者github地址:https://github.com/gbirke/jquery_pagination 在这基础上加入了跳转到指定页。 修改后的jquery.pagination.js /** * This jQuery plugin displays pagination links in 阅读全文
posted @ 2017-08-02 20:38 Vincent-Li 阅读(1425) 评论(0) 推荐(0) 编辑
摘要: 在测试cordova开发的安卓APP过程中,使用$cordovaImagePicker.getPictures(options)获取相册照片时,华为机型总是会闪退。 config.xml已经添加了权限 如果先调用相机$cordovaCamera.getPicture(options)弹出权限申请,赋 阅读全文
posted @ 2017-06-08 17:26 Vincent-Li 阅读(5240) 评论(0) 推荐(1) 编辑
摘要: 最近在开发cordova项目,安卓APP需要调用照相机和系统相册,在添加安卓权限的时候,总是报错。 以下是部分config.xml代码 其中权限部分为: 编译的时候总是报错: 解决: 在widget标签引入xmlns:android="http://schemas.android.com/apk/r 阅读全文
posted @ 2017-05-26 17:49 Vincent-Li 阅读(10240) 评论(2) 推荐(1) 编辑
摘要: 项目中需要所有首次登录的用户必须修改密码才可使用系统,项目采用的是Shiro框架。 突然想到了配置文件org.apache.shiro.spring.web.ShiroFilterFactoryBean中的loginUrl,校验未登录则跳转到登录地址。索性研究了它的源码后可以继承AccessCont 阅读全文
posted @ 2017-04-11 17:09 Vincent-Li 阅读(19790) 评论(0) 推荐(2) 编辑
摘要: 当登录的Session失效后,采用ajax请求数据时会没有反应,这时候应该自动跳转到登录页面,让用户重新登录。 全局配置以下可实现 阅读全文
posted @ 2017-04-11 16:54 Vincent-Li 阅读(526) 评论(0) 推荐(0) 编辑