- 博客(10)
- 资源 (1)
- 收藏
- 关注
原创 rabbitmq direct消息发送
一、配置package com.czq.amqp.rabbitmqdemo.config.amqp;import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;import org.springframework.amqp.rabbit.connection.CachingConnect...
2019-08-28 17:48:55 215
原创 spring aop获取方法指定annotation的参数
指定注解为:HeaderParam处理过程:@Around("execution(execution(* com.test.service.*.*(..))")public Object exceptionHandle(ProceedingJoinPoint js){ try { baseParamSetIp(js); return js.pro...
2019-08-19 18:02:32 1438
原创 poi生成excel下载
springmvc下载excel一、springmvc入口二、构建内容三、生成excel四、参考一、springmvc入口@RequestMapping(value=“downloadExcel”)public void downloadExcel(HttpServletRequest request, HttpServletResponse response){OutputStream ...
2019-03-31 22:25:44 1774
转载 poi读取excel
一、poi读取excel public static void main(String[] args) throws Exception{// String pathName = "/Users/mac/Documents/work/record/datacenter/dc-wmq-resource/commands.xls"; String pathName...
2019-03-25 10:38:44 480
原创 kafka-groupid
kafka启动异常描述:2019-03-19 17:59:23.026 ERROR 94676 --- [ntainer#0-0-C-1] o.a.k.c.c.internals.AbstractCoordinator : Attempt to join group failed due to fatal error: The configured groupId is invalid...
2019-03-19 18:17:06 4051
原创 linux环境搭建nginx文件下载服务
一、环境依赖yum install -y gcc-c++yum install -y pcre pcre-develyum install -y zlib zlib-develyum install -y openssl openssl-devel二、获取nginxwget http://101.96.8.156/nginx.org/download/nginx-1.8.1.ta...
2019-02-14 16:24:19 1186
原创 斐波那契数列生成
斐波那契数列生成public static void fbnq(){ int n = 20; System.out.printf("%5d", 0); System.out.printf("%5d", 1); System.out.printf("%5d", 1); if(n > 2){ fbnq(1,1,n); }}public
2017-07-21 16:29:58 248
原创 螺旋矩阵
螺旋矩阵public static void juz(){ int i = 1; int n = 10; int l = 0, h = 0; boolean right = true; boolean down = false; boolean left = false; boolean up = false; int[][] a = new
2017-07-21 16:12:18 225
原创 java排序
冒泡排序public static void mapao(){ int[] a = {3,2,5,34,57,12,7,18,26,22}; int temp = 0; for(int i = 0; i length; i++){ for(int j = 1; j length - i; j++){ if(a[j] 1]){//做交换,升序
2017-07-21 15:44:16 160
原创 java查询
折半查找public static void zb(){ int[] a = {1,3,5,8,10,13,15,17,23}; int find = 15; int high = a.length - 1; int low = 0; Integer index = null; while (low <= high){ int middle
2017-07-21 15:10:28 422
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人