小凡156

博客园 首页 新随笔 联系 订阅 管理

2019年11月1日 #

摘要: start0调用jvm的JVM_StartThread函数 调用run方法 总结: 1:JVM通过new JavaThread(&thread_entry, sz); 创建一个系统内核线程。 2:在内核线程的初始运行方法中,利用JavaCalls模块,调用java线程的run()方法,开始java级 阅读全文
posted @ 2019-11-01 18:22 小凡156 阅读(805) 评论(0) 推荐(0) 编辑

2019年10月31日 #

摘要: /* What will be run. */ private Runnable target; 如果线程在创建时传入了Runnable运行对象,那么该对象的run方法将被调用 1 /** 2 * If this thread was constructed using a separate 3 * <code>Runnable</code> run object, then that 4 * < 阅读全文
posted @ 2019-10-31 22:42 小凡156 阅读(358) 评论(0) 推荐(0) 编辑

摘要: 总结: 1. 要通过thread来执行的类实例,并且不需要重写除了run()以外其它thread方法,则应使用runnable接口2. 实现runnable接口必须定义一个没有参数的run方法,run方法中可以做任何操作 阅读全文
posted @ 2019-10-31 20:30 小凡156 阅读(248) 评论(0) 推荐(0) 编辑

2019年10月30日 #

摘要: 后端服务的实体对象增加了几个参数,其中包含(Integer类型)。前端在传参时,Integer参数是下拉列表,getValue()=null, 把null传到后端接口,就出现了400 解决办法:因为参数是非必填的,所以在传参时进行判断,如果为null,则不传 阅读全文
posted @ 2019-10-30 18:38 小凡156 阅读(133) 评论(0) 推荐(0) 编辑

摘要: 1 默认构造方法 分配一个新的线程对象 2 这个构造器和上面的#Thread(ThreadGroup,Runnable,String)方法有相同作用,其中线程名是新生成的名称 3 自动生成名称的格式为Thread-n,其中n是一个整数 4 /** 5 * Allocates a new {@code Thread} object. This constructor has the same 6 * 阅读全文
posted @ 2019-10-30 12:41 小凡156 阅读(343) 评论(0) 推荐(0) 编辑

摘要: 初始化线程的核心方法 参数:ThreadGroup(线程组) Runnable 阅读全文
posted @ 2019-10-30 09:24 小凡156 阅读(509) 评论(0) 推荐(0) 编辑

2019年10月29日 #

摘要: jdk方法定义 public static native void yield(); yield()方法的作用是 放弃当前的CPU资源,将它让给其它任务。但放弃的时间不确定。 | | jvm层实现 jvm_yield 阅读全文
posted @ 2019-10-29 22:06 小凡156 阅读(1039) 评论(0) 推荐(0) 编辑

2019年10月16日 #

摘要: dto.getAmount() 是long类型,需要先转成BigDecimal 再计算 BigDecimal amount = dto.getAmount()!=null? new BigDecimal(dto.getAmount()).divide(new BigDecimal(1000),2,R 阅读全文
posted @ 2019-10-16 20:01 小凡156 阅读(1333) 评论(0) 推荐(0) 编辑

2019年10月15日 #

摘要: 后台接收前端传来的集合参数 阅读全文
posted @ 2019-10-15 10:32 小凡156 阅读(7514) 评论(0) 推荐(2) 编辑

摘要: v-if/v-else 阅读全文
posted @ 2019-10-15 10:00 小凡156 阅读(2866) 评论(0) 推荐(0) 编辑