摘要:
1: top2: ps H -eo pid,tid,%cpu |grep 进程ID3:printf '0X%x\n' 线程TID4:jstack 进程ID|grep 16进制线程TID -A 20 阅读全文
摘要:
Map<String, Object> map = (Map) new MyBeanMap(systemUser); PrincipalFactory principalFactory = new DefaultPrincipalFactory(); Principal principal = pr 阅读全文
摘要:
#!/usr/bin/env bash INPUT=$2 #接收第二个参数(jar文件) FILE_PATH=`readlink -f ${INPUT}` #获取jar文件的绝对路径 SERVICE=${INPUT##*/} SERVICE_NAME=${SERVICE%.*} DAYTIME=$( 阅读全文
摘要:
一、js 正则表达式 1、密码强度,至少包含大小写字母、特殊字符、数字三种及以上,长度8~20位 var reg = /(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W_!@#$%^&*`~()-+=]+$)(?![a-z0-9]+$)(?![a-z\W_!@#$%&*~( 阅读全文
摘要:
修改nginx的http响应头server字段修改源码 src/http/ngx_http_header_filter_module.c修改前:static u_char ngx_http_server_string[] = "Server: nginx" CRLF;static u_char ng 阅读全文
摘要:
#Step1:删除原有的3306端口访问规则firewall-cmd --permanent --remove-port=3306/tcp #Step2:添加富规则firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source 阅读全文
摘要:
生成证书: 1.首先使用openssl执行如下命令生成一个key: openssl genrsa -des3 -out nginx.key 1024 然后他会要求你输入这个key文件的密码。不推荐输入。因为以后要给nginx使用。每次reload nginx配置时候都要你验证这个PAM密码的。 由于 阅读全文
摘要:
/** * 获取html字符串中第一张图片的路径 * @param htmlcontent * @return */ public static String getImgFromHtml(String htmlcontent){ if(htmlcontent!=null){ Stri... 阅读全文
摘要:
在spring的配置文件中添加json转换器即可 阅读全文
摘要:
做OA项目中用到了从数据库读下拉框的值。方法的类被SPRING管理就是说不能通过new()得到对象。开始的做法是public static DictionarySelect getFromApplicationContext() {ApplicationContext ctx= new ClassP... 阅读全文