IP屬地:北京
文章概要 1、什么是單例2、為什么需要單例3、單例的優(yōu)點(diǎn)和缺點(diǎn)4、單例的寫法和比較5、序列化破壞單例6、反射破壞單例7、不使用synchroni...
在mybatis配置文件中配置
正常來說,我們都認(rèn)為把flag字段添加volatile,線程就可以正常退出實(shí)驗發(fā)現(xiàn),結(jié)果并不像我們所想的那樣注釋掉1和2,線程不會退出,寫上1或...
1、#{} 進(jìn)行預(yù)編譯,使用jdbc時的preparedStatement,轉(zhuǎn)換成占位符例如:select * from user where ...
1、CountDownLatch程序計數(shù)器官方解釋:A synchronization aid that allows one or more ...
1、execute是接口Executor的方法submit是Executor子接口ExecutorService的方法2、接收參數(shù)不同 3、返回...