
Java
隐于山后
这个作者很懒,什么都没留下…
展开
-
删除Document中的键值对
删除Document中的键值对Iterator<Map.Entry<String, Object>> it = j.entrySet().iterator();while (it.hasNext()){Map.Entry<String, Object> temp = it.next();if (temp.getValue().toString().length()<1){it.remove();}}System.out.println(j.toJSO原创 2021-05-18 16:16:17 · 154 阅读 · 0 评论 -
报错:NoSuchAlgorithmException: Algorithm HmacSHA1 not available
报错:NoSuchAlgorithmException: Algorithm HmacSHA1 not available有个项目需要部署到Linux上运行,其中使用到了MongoDB链接并添加了用户和密码,项目在Win环境运行没有问题。放到Linux上之后,一直报错用户名或密码不对。多次调试Win环境没问题,一到Linux就报错,(报错信息角落:NoSuchAlgorithmException: Algorithm HmacSHA1 not available不太容易注意到)。解决方法: 在原创 2020-10-15 11:05:34 · 2713 阅读 · 0 评论