
java
连边
公众号@连边
展开
-
Error occurred during initialization of VM
Java可用的最大的内存,可以用这个命令行检测(查看Java版本号,-Xmx最大内存。)Java -Xmx3000M -version如果上边的命令行能够执行,而跑批处理(.bat)还是报如下错误,十有八九是需要重启命令行窗口(关闭之后重新打开)。Error occurred during initialization of VM Could not reserve enough space for object heap...原创 2021-12-20 10:51:22 · 1637 阅读 · 0 评论 -
mybatis-plus修改字段允许为空
ActivityEntity activityEntity = ConvertUtils.convertBean(activityBo, ActivityEntity.class);LambdaUpdateWrapper<ActivityEntity> wrapper = new LambdaUpdateWrapper<>();// 允许上线时间为空wrapper.set(ActivityEntity::getOnlineDate, activityEntity.getOnli原创 2021-08-12 19:38:51 · 1236 阅读 · 0 评论 -
mysql包含换行符号空格like搜索
最近做一个站内信的功能,站内信的内容字段包含换行符号\n ,功能上又包含like,用户输入又不会输入换行符。站内信内容如下:您成功参与了【{userNick}】发起的拼团成为了团长 \n 邀请用户参团可赚【{money}】元文章目录问题解决方式ASCII表问题包含换行符、空格、一些特殊字符,怎么like搜索解决方式代码过滤用户输入的空格字符使用MySQL的REPLACE关键字结合MyBatis Plus实战// 过滤搜索内容中的空格String content = StringU原创 2021-07-29 20:56:07 · 841 阅读 · 0 评论 -
SpringBoot整合Redis储存对象
java对象以json的方式存储到redis中通过set进redis中的数据,get不到 String cityKey ="city_"+id; ValueOperations<String,City> operations = this.redisTemplate.opsForValue(); // 判断缓存中是否存在 if (this.redisTemplate.hasKey(cityKey)){ City city = operations.get(cityKey转载 2021-07-26 16:48:41 · 2607 阅读 · 0 评论 -
mybatis json转对象Object
在实体类中添加json处理器注解1.1 实体类 @TableName(value = "user_site_mail", autoResultMap = true)1.2 具体字段上边 @TableField(value = "business_info", typeHandler = FastjsonTypeHandler.class)对象智能映射实体类@TableName(value = "user_site_mail", autoResultMap = true)public cla.原创 2021-07-19 18:25:04 · 2083 阅读 · 0 评论 -
用java8的foreach快速循环map
用java8的foreach快速循环mapList<String> stringList1 = Arrays.asList("zhangsan1", "lisi1", "wangwu1");List<String> stringList2 = Arrays.asList("zhangsan2", "lisi2", "wangwu2");List<String> stringList3 = Arrays.asList("zhangsan3", "lisi3", "wa原创 2021-07-18 15:39:18 · 433 阅读 · 0 评论 -
swagger实体类生成不了文档的解决办法
swagger版本<dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.8.0</version></dependency><dependency> <groupId>com.github.xiaoy原创 2021-07-09 15:16:41 · 1345 阅读 · 0 评论