会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
【MapSheep】
[好记性不如烂笔头]
博客园
首页
新随笔
新文章
联系
订阅
管理
上一页
1
···
19
20
21
22
23
24
25
26
27
···
38
下一页
2021年7月25日
SpringDataRedis 常用命令
摘要: stringRedisTemplate.opsForValue().set("test", "100",60*10,TimeUnit.SECONDS); //向redis里存入数据和设置缓存时间 stringRedisTemplate.opsForValue().get("test"); //根据k
阅读全文
posted @ 2021-07-25 16:33 (Play)
阅读(106)
评论(0)
推荐(0)
2021年7月23日
Java 连接 Redis
摘要: 引入Maven依赖 <!-- https://mvnrepository.com/artifact/redis.clients/jedis --> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId>
阅读全文
posted @ 2021-07-23 18:28 (Play)
阅读(325)
评论(0)
推荐(0)
Java 循环标记
摘要: /** * Labeled block。 * * @param args */ public static void main(String[] args) { task: { int age = 25; System.out.println("start"); if (age < 30) { br
阅读全文
posted @ 2021-07-23 18:27 (Play)
阅读(229)
评论(0)
推荐(0)
使用Lambda表达式 .groupingBy函数进行分组
摘要: import cn.hutool.core.lang.Assert; import com.alibaba.fastjson.JSON; import com.example.demo.Demo.dto.Student; import java.util.*; import java.util.st
阅读全文
posted @ 2021-07-23 10:18 (Play)
阅读(1109)
评论(0)
推荐(0)
Assert.isTrue 自定义异常
摘要: 自定义异常检测 条件为 false 时触发 Assert.isTrue(stuList.size() > 0, "当前集合为空"); 解决方案 调整 关键字为 true
阅读全文
posted @ 2021-07-23 10:15 (Play)
阅读(1675)
评论(0)
推荐(0)
2021年7月21日
职业操守
摘要: 优秀的程序员, 不只是有能力写得一手好代码, 更多的是需要具备一些工程师素养, 比如: 1.对技术有独特的兴趣和追求, 持续学习. 2.有全局观, 总能站在一个更高、更全局的视角去考虑问题. 3.处理事情小心谨慎, 而不是凭直觉和过去的经验主观臆断. 4.沟通能力强, 能够用方便他人理解的方式来描述
阅读全文
posted @ 2021-07-21 10:53 (Play)
阅读(279)
评论(0)
推荐(0)
2021年7月20日
Java后端判断请求设备
摘要: 调用 String ua = request.getHeader("User-Agent"); if (StringUtil.checkAgentIsMobile(ua)) { System.out.println("来自移动端访问"); } else { System.out.println("来
阅读全文
posted @ 2021-07-20 16:44 (Play)
阅读(699)
评论(0)
推荐(0)
Java BigDecimal类型保留两位小数比对大小
摘要: /** * BigDecimal 保留两位小数进行对比 */ public class BigDecimalTest { public static void main(String[] args) { BigDecimal big1 = new BigDecimal("3.14"); BigDec
阅读全文
posted @ 2021-07-20 16:42 (Play)
阅读(411)
评论(0)
推荐(0)
优雅的使用Lambda .map this调用方法
摘要: 示例代码 import com.alibaba.fastjson.JSON; import com.example.demo.Demo.dto.Student; import com.example.demo.pojo.StudentPlus; import java.util.ArrayList;
阅读全文
posted @ 2021-07-20 16:39 (Play)
阅读(287)
评论(0)
推荐(0)
com.mongodb.MongoCommandException: Command failed with error 48 (NamespaceExists) MongoDB报错
摘要: 报错 com.mongodb.MongoCommandException: Command failed with error 48 (NamespaceExists): 'a collection 'mapMongoDB.macCode01' already exists' on server l
阅读全文
posted @ 2021-07-20 10:52 (Play)
阅读(1307)
评论(0)
推荐(0)
上一页
1
···
19
20
21
22
23
24
25
26
27
···
38
下一页