一、rabbitMQ的初相识 生产端代码 ` public void testSendMessage() throws IOException, TimeoutException { //创建连接mq的连接工厂对象 ConnectionFactory connectionFactory = new ...
分类:
其他好文 时间:
2021-04-15 12:46:15
阅读次数:
0
1、先对系统生成的Fragment改造成更直观的,比如这种 public class DashboardFragment extends Fragment { private DashboardViewModel dashboardViewModel; public View onCreateVie ...
分类:
移动开发 时间:
2021-04-15 12:40:48
阅读次数:
0
SpringMVC 9大组件初始化 由上面的断点流程,可以看出来其实是在spring容器初始化完成的最后一步,通过发送event事件 @Override public void publishEvent(ApplicationEvent event) { Assert.notNull(event, ...
分类:
编程语言 时间:
2021-04-15 12:33:25
阅读次数:
0
package ShunXuDome;public class forDOme05 { public static void main(String[] args) { int[]numbers={10,20,30,40,50};//定义了一个数组 for (int i = 0; i < 5; i+ ...
分类:
其他好文 时间:
2021-04-15 12:23:41
阅读次数:
0
事件监听 当某个事件发生,会产生什么? public class Demo01 { public static void main(String[] args) { //按下按钮,触发事件 Frame frame = new Frame(); Button button = new Button() ...
分类:
其他好文 时间:
2021-04-14 12:40:04
阅读次数:
0
增强for循环 public class ForDemo{ public static void main(String[] args){ int[] numbers = {10,20,30,40,50}; //遍历数组元素 for(int x:numbers){ System.out.printl ...
分类:
编程语言 时间:
2021-04-14 12:36:49
阅读次数:
0
对于链表添加操作,假如不考虑按序号添加,则可以写一个简单的方法: public void add(HeroNode heroNode) { //因为head节点不能动,因此我们需要一个辅助变量遍历 HeroNode temp = head; //遍历链表,找到最后 while (true) { // ...
分类:
其他好文 时间:
2021-04-14 12:35:54
阅读次数:
0
package com.kuang.struct; public class TestDemo { public static void main(String[] args) { //打印三角形 5行 for (int i = 1; i <= 5; i++) { for (int j = 5; j ...
分类:
其他好文 时间:
2021-04-14 12:09:53
阅读次数:
0
// 1.Java方法 public static void main (String args[]){ int res = sum(1, 2); // int res = HelloWorld.sum(1, 2); System.out.println(res); } // 求和 public s ...
分类:
编程语言 时间:
2021-04-14 12:05:41
阅读次数:
0
先来个单例模式的线程安全代码 package basic.single; public class SingleTon { private SingleTon(){ System.out.println(Thread.currentThread().getName()); } private sta ...
分类:
其他好文 时间:
2021-04-14 11:58:53
阅读次数:
0