上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 26 下一页
摘要: 官网解释 If this thread is blocked in an invocation of the wait(), wait(long), or wait(long, int) methods of the Object class, or of the join(), join(long 阅读全文
posted @ 2019-12-16 16:59 龙宇在天 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 官网描述 join Waits for this thread to die. An invocation of this method behaves in exactly the same way as the invocation join(0) An invocation of this m 阅读全文
posted @ 2019-12-13 15:26 龙宇在天 阅读(841) 评论(0) 推荐(0) 编辑
摘要: 官网API解释 setDaemon public final void setDaemon(boolean on) Marks this thread as either a daemon thread or a user thread. The Java Virtual Machine exits 阅读全文
posted @ 2019-12-13 11:41 龙宇在天 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 使用继承Thread类的方式创建线程 银行叫号部分的代码 package com.dwz.concurrency.chapter2; /** * 使用static保证号码数据共享 * 线程的创建方式:继承Thread类 */ public class TicketWindow extends Thr 阅读全文
posted @ 2019-12-12 14:02 龙宇在天 阅读(486) 评论(0) 推荐(0) 编辑
摘要: 多线程Thread:1.java应用程序的main函数是一个线程,是被JVM启动的时候调用,线程的名字叫main2.实现一个线程,必须创建Thread实例,override run方法,并且调用start方法3.在JVM启动后,实际上有多个线程,但是至少有一个非守护线程。4.当你调用一个线程star 阅读全文
posted @ 2019-12-11 10:48 龙宇在天 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 注意:mysql的下标是从0开始的 参考文章: https://blog.csdn.net/warylee/article/details/77533122 阅读全文
posted @ 2019-11-28 14:24 龙宇在天 阅读(1295) 评论(0) 推荐(0) 编辑
摘要: spring cloud stream整体架构核心概念图: 图一:消息的发送端和接收端可以是不同的中间件 图二: 图三:在消息的发送之前和消息的接收端套了一层管道 @Output:输出注释,用于定义发送消息接口 @Input:输入注解,用于定义消息的消费者接口 @StreamListener:用于定 阅读全文
posted @ 2019-11-23 10:24 龙宇在天 阅读(834) 评论(0) 推荐(0) 编辑
摘要: 导入pom.xml 配置生产者 第一步:配置application.properties 第二步:开发启动类Application.java 第三步:加入实体类order 第四步:开发消息发送方法 第五步:测试发送消息 配置消费者 第一步:配置application.properties 第二步:开 阅读全文
posted @ 2019-11-23 09:56 龙宇在天 阅读(467) 评论(0) 推荐(1) 编辑
摘要: 我们在进行发送消息的时候,正常情况下消息体为二进制的数据方式进行传输,如果希望内部帮我们进行转换,或者指定自定义的转换器,就需要用到MessageConverter 自定义常用转换器:MessageConverter,一般来讲都需要实现这个接口 重写下面两个方法: toMessage:java对象转 阅读全文
posted @ 2019-11-22 16:24 龙宇在天 阅读(3167) 评论(0) 推荐(0) 编辑
摘要: 我们把之前的消息监听代码注释,可以不用直接加消息监听,而是采用MessageListenerAdapter的方式,我们来学习下如何使用默认的handleMessage,自定义方法名,自定义转换器。 适配器方式一: MessageListenerAdapter 可以通过适配器,适配自己的实现,这里我们 阅读全文
posted @ 2019-11-22 14:30 龙宇在天 阅读(10014) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 26 下一页
//右侧添加目录 //增加页面点击显示24字社会主义核心价值观