多线程
- 在main函数种,启动了一个设置为“守护”线程的【setDaemon(true)】,该线程启动后,线程的run()可以完整执行嘛?
答案:不可以。当一个Java应用内,只有守护线程时,Java虚拟机就会自然退出。 请见《实战java高并发程序设计》- 2.5 驻守后台:守护线程(Daemon)
线程的优先级范围及默认优先级
/**
* The minimum priority that a thread can have.
*/
public final static int MIN_PRIORITY = 1;
/**
* The default priority that is assigned to a thread.
*/
public final static int NORM_PRIORITY = 5;
/**
* The maximum priority that a thread can have.
*/
public final static int MAX_PRIORITY = 10;
redis 字符串内部编码 长度分界点:
- 3.0版本之前 39
- 3.2版本之后 44
- tk.mapper 的bug:
- selectOne() 如果有多个会报错,而不是limit1
- select,update, delete 如果对象属性为空的时候,会存在问题
- update-safe, delete-safe
- updateByPrimaryKeySelective, insertByPrimaryKeySelective, 必须指定@ID
show global variables like ‘%isolation%’;
set global transaction_isolation =’read-committed’;