上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 39 下一页
摘要: 效果图 依赖 <dependency> <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> <version>4.1.36.Final</version> </dependency> 客户端代码 import io.netty 阅读全文
posted @ 2020-11-18 17:26 HumorChen99 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 效果图 代码 import java.util.Date; import java.util.concurrent.*; public class MyFutureTaskTest { //使用线程池方式 public static final void threadPool() throws In 阅读全文
posted @ 2020-11-18 16:50 HumorChen99 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 效果图 安装kafka参见我的教程https://blog.csdn.net/HumorChen99/article/details/109726939 生产者 消费者 代码 生产者 /** * 生产者 * author:chen * date:2020.11.12 */ //引入kafka-nod 阅读全文
posted @ 2020-11-17 16:23 HumorChen99 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 拉取zookeeper 镜像 docker pull wurstmeister/zookeeper 创建并启动容器 docker run --name zookeeper -p 2181:2181 -V /etc/localtime:/etc/localtime -d wurstmeister/zo 阅读全文
posted @ 2020-11-17 16:07 HumorChen99 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 全局异常处理类 /** * @Author:humorchen * @Date 2020/11/6 10:46 */ @ControllerAdvice @ResponseBody public class GlobalExceptionHandler { private static final 阅读全文
posted @ 2020-11-08 17:22 HumorChen99 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 添加依赖: <!-- Swagger2--> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.9.2</version> </dependency> 阅读全文
posted @ 2020-11-08 17:15 HumorChen99 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 报错信息:autoType is not support 阅读源码后找这个autotype 解决办法: 在fastjson的序列化器中加一句 static { ParserConfig.getGlobalInstance().addAccept("com.humorchen"); } 阅读全文
posted @ 2020-11-08 15:08 HumorChen99 阅读(1) 评论(0) 推荐(0) 编辑
摘要: FastJson序列化器 实现RedisSerializer /** * @Author:humorchen * @Date 2020/11/8 13:32 */ @Component public class FastJson2JsonRedisSerializer<T> implements R 阅读全文
posted @ 2020-11-08 15:04 HumorChen99 阅读(2) 评论(0) 推荐(0) 编辑
摘要: org.springframework.web.servlet.resource.ResourceHttpRequestHandler cannot be cast to org.springframework.web.method.HandlerMethod 访问的是http://localhos 阅读全文
posted @ 2020-11-08 12:18 HumorChen99 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 按照以下配置即可修复 Swagger配置类 @Configuration public class SwaggerConfig implements WebMvcConfigurer { @Bean public Docket createRestApi() { return new Docket( 阅读全文
posted @ 2020-11-08 12:06 HumorChen99 阅读(1) 评论(0) 推荐(0) 编辑
上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 39 下一页