自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

转载 HashMap多线程下发生死循环原因及解决

可能发生的原因:1、多线程put操作后,get操作导致死循环。2、多线程put非null元素后,get操作得到null值。解决:1、使用ConcurrentHashMap代替HashMap。2、使用Collections.synchronizedMap(Mao<K,V> m)方法把HashMap变成一个线程安全的Map。...

2019-05-28 17:32:49 627

原创 Mybatis之查询一张表中一个字段的上下2条数据

selectcontent, country_id,(select title from information WHERE #{id} &gt; id and (status = 1) ORDER BY id DESC limit 1) AS last_title,(select title from information WHERE id &gt; #{id} and (status ...

2018-12-21 19:59:31 881

原创 Mybatis之查出一张表中一个字段2种不同类型的数据

查出一张表中一个字段2种不同类型的数据selectid, title, content, picture, timestamp, type, status, country_idfrom (select * from information order by TIMESTAMP DESC) AS bwhere status=1 and country_id=#{countryId, jdb...

2018-12-19 20:01:15 967 1

原创 Java菜鸟日常问题总结

使用idea打war包报错收集打包报错:打包时无法生成war,并且compile报错:解决:)打包报错:打包时无法生成war,并且compile报错:[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project...

2018-12-19 19:56:32 247

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除