- 博客(4)
- 收藏
- 关注
原创 SpringBoot @Async整合线程池
线程池配置 import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.task.TaskExecutor; import org.springframework.scheduling.annotation.EnableAsync; import org.springframewo
2021-02-01 11:17:15 101
原创 Netty 入门demo-Echo服务器
demo说明 这个demo演示的是启动客户端时会给服务器发送一条消息,服务器会将这条消息发回给客户端 Client /** * @author YanYu * @create 2021-01-18 9:51 */ public class EchoClient {//客户端启动类 private String host; private int port; public EchoClient(String host, int port) { this.hos
2021-01-20 15:22:54 157 2
原创 Netty TCP粘包/拆包问题解决
LineBaseFrameDecoder和StringDecoder //以读取\n或\r\n为一个包,如果在最大长度1024没有读到\n或\r\n,报异常 ch.pipeline().addLast(new LineBasedFrameDecoder(1024)); ch.pipeline().addLast(new StringDecoder()); ch.pipeline().addLas
2021-01-20 14:43:16 94
原创 Mybatis is not null 关于mysql和mybatis查询结果不一致问题
is not null 关于mysql和mybatis查询结果不一致问题 在mybatis中写sql语句时,我遇到的问题是,SQL语句中有is not null时,在mysql和程序之中查询结果不同,把 字段 is not null 换成 ifnull(字段名,空值别名)!=空值别名 ...
2020-08-24 10:56:47 2479 2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人