swagger-api

restful api @ApiOperation(value = "支付异步通知") @RequestMapping(value = "/payment/{type}/notice", method = {RequestMethod.POST, RequestMethod.GET}) public String notice( @ApiIgnore @HttpBody(paymentType = PaymentTypeEnum.alipay) String json, @ApiIgnore @HttpBody(paymentType = PaymentTypeEnum.wechat) String xml, @ApiParam(valu...

高低位算法生成序列号

package cn.hl.util; public class HiloOptimizer { /** * 类型 */ public enum Type { /** 商品 */ product, /** 订单 */ order, /** 收款单 */ payment, /** 退款单 */ refunds, /** 发货单 */ shipping, /** 退货单 */ returns } private Type type; private String...

mac查看当前内存

#!/usr/bin/python ''' Created on Jun 1, 2014 @author: jay ''' import subprocess import re # Get process info ps = subprocess.Popen(['ps', '-caxm', '-orss,comm'], stdout=subprocess.PIPE).communicate()[0] vm = subprocess.Popen(['vm_stat'], stdout=subprocess.PIPE).communicate()[0] # Iterate processes processLines = ps.split('\n') sep = re.compile('[\s]+') rssTotal = 0 # kB f...

Linux查看物理CPU个数、核数、逻辑CPU个数

Linux查看物理CPU个数、核数、逻辑CPU个数 # 总核数 = 物理CPU个数 X 每颗物理CPU的核数 # 总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数 # 查看物理CPU个数 cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l # 查看每个物理CPU中core的个数(即核数) cat /proc/cpuinfo| grep "cpu cores"| uniq # 查看逻辑CPU的个数 cat /proc/cpuinfo| grep "processor"| wc -l # 查看CPU信...

Exception during scan: “files/e8482945c9011a1fad7f0293d9760c26” is locked

sudo -u www-data php occ files:scan --all Starting scan for user 1 out of 1 (admin) Exception during scan: "files/e8482945c9011a1fad7f0293d9760c26" is locked #0 /var/www/html/lib/private/Files/Storage/Common.php(713): OC\Lock\DBLockingProvider->acquireLock('files/e8482945c...', 2) #1 /var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php(592): OC\Files\Storage\Commo...

rpc-摘录

远程过程调用(RPC)详解 本文介绍了什么是远程过程调用(RPC),RPC 有哪些常用的方法,RPC 经历了哪些发展阶段,以及比较了各种 RPC 技术的优劣。 什么是 RPC RPC 是远程过程调用(Remote Procedure Call)的缩写形式,Birrell 和 Nelson 在 1984 发表于 ACM Transactions on Computer Systems 的论文《Implementing remote procedure calls》对 RPC 做了经典的诠释。RPC 是指计算机 A 上的进程,调用另外一...

ProceedingJoinPoint获取当前方法

Signature sig = pjp.getSignature(); MethodSignature msig = null; if (!(sig instanceof MethodSignature)) { throw new IllegalArgumentException("该注解只能用于方法"); } msig = (MethodSignature) sig; Object target = pjp.getTarget(); Method currentMethod = target.getClass().getMethod(msig.getName(), msig.getParameterTypes());