![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java后端
弓长จุ๊บ
这个作者很懒,什么都没留下…
展开
-
解决 Gson int自动转double问题
本文是要解决使用Gson,后端返回的int或者long类型,会自动转为double。具体原理就不多说了,网上有很多,有兴趣的小伙伴可以去看 TypeAdapter 和 ObjectTypeAdapter。原创 2023-03-23 16:32:14 · 1072 阅读 · 0 评论 -
汉字转拼音
import java.util.HashSet;import java.util.Set;import net.sourceforge.pinyin4j.PinyinHelper;import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;import net.sourceforge.pinyin4j.format原创 2020-06-24 12:35:26 · 209 阅读 · 0 评论 -
MyBatis 使用注解方式 IN 操作符
我们在使用MyBatis的时候,会使用in操作符,可以用foreach进行操作,使用方式如下: @Select({"<script>", "select * from user WHERE is_delete=0 IN", "<foreach collection='positionList' item='item' index='index' open='(' separator=',' close=')'>",原创 2020-06-18 17:42:24 · 1092 阅读 · 0 评论