上一页 1 2 3 4 5 6 7 8 ··· 11 下一页
摘要: public class teast { private String str; private int counterOfDoubleByte; private byte b[]; /** * 设置需要被限制长度的字符串 * @param str 需要被限制长度的字符串 */ public tea 阅读全文
posted @ 2021-07-10 00:03 风骚羊肉串 阅读(550) 评论(0) 推荐(0) 编辑
摘要: MySQL DATE_SUB(date,INTERVAL expr type) 和 SUBDATE(date,INTERVAL expr type) 两个函数作用相同,都是执行日期的减法运算。 DATE_SUB() 和 SUBDATE() 函数接受两个参数: date 是 DATE 或 DATETI 阅读全文
posted @ 2021-07-07 13:46 风骚羊肉串 阅读(1672) 评论(0) 推荐(0) 编辑
摘要: 在Stream流中将List转换为Map,是使用Collectors.toMap方法来进行转换。 1.key和value都是对象中的某个属性值。 Map<String, String> userMap1 = userList.stream().collect(Collectors.toMap(Use 阅读全文
posted @ 2021-07-06 14:46 风骚羊肉串 阅读(15839) 评论(0) 推荐(0) 编辑
摘要: 查看表索引 show index from topic_watch_read_record; 删除表索引 alter table t_topic_watch_read_record drop index uk_user; 1、添加PRIMARY KEY(主键索引) mysql>ALTER TABLE 阅读全文
posted @ 2021-07-06 14:32 风骚羊肉串 阅读(1290) 评论(0) 推荐(0) 编辑
摘要: Jackson相关: 2、@JsonIgnoreProperties 此注解是类注解,作用是json序列化时将java bean中的一些属性忽略掉,序列化和反序列化都受影响。 3、@JsonIgnore 此注解用于属性或者方法上(最好是属性上),作用和上面的@JsonIgnoreProperties 阅读全文
posted @ 2021-07-01 15:34 风骚羊肉串 阅读(888) 评论(0) 推荐(0) 编辑
摘要: 今天遇到这个问题时,发现有一个工具类可以快速解决这个问题,那就是org.apache.commons.lang3包下的StringUtils工具类下的join()方法。 StringUtils中join()方法的使用,如下示例所示: import java.util.ArrayList; impor 阅读全文
posted @ 2021-06-30 14:57 风骚羊肉串 阅读(2072) 评论(0) 推荐(0) 编辑
摘要: resultTyperesultType可以把查询结果封装到pojo类型中,但必须pojo类的属性名和查询到的数据库表的字段名一致。如果sql查询到的字段与pojo的属性名不一致,则需要使用resultMap将字段名和属性名对应起来,进行手动配置封装,将结果映射到pojo中resultMapresu 阅读全文
posted @ 2021-06-30 11:33 风骚羊肉串 阅读(418) 评论(0) 推荐(0) 编辑
摘要: 截取数组中第一个图片:String image = null;if(superMarketInfo.getKindsImage().contains(",")){ image = superMarketInfo.getKindsImage().substring(0,superMarketInfo. 阅读全文
posted @ 2021-06-21 15:42 风骚羊肉串 阅读(16608) 评论(0) 推荐(0) 编辑
摘要: if(scenicInfo.getKindsImage() != null){ List<String> imageUrl = JSONArray.parseArray(scenicInfo.getKindsImage(),String.class); scenicInfo.setKindsImag 阅读全文
posted @ 2021-06-21 10:23 风骚羊肉串 阅读(904) 评论(0) 推荐(0) 编辑
摘要: 介绍过几种操作ES的方法 安装Elasticsearch-Head或者使用Postman,也可以使用官方的Kibana直接请求接口,同时 使用官方推荐的Java High Level REST Client 使用Sping Data项目于中的Spring Data Elasticsearch框架 使 阅读全文
posted @ 2021-06-17 17:06 风骚羊肉串 阅读(233) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 11 下一页