- 博客(8)
- 收藏
- 关注
原创 如何在Java中使用Lambda表达式
总之,Lambda表达式是Java 8中新增的一项非常有用的特性。建议尝试在自己的项目中应用Lambda表达式,以提高代码的可读性和简洁性。在Java中,Lambda表达式是一个匿名的函数,可以传递给其他方法或存储在变量中。在Java中,集合是最常见的数据结构,可以使用Lambda表达式来遍历和筛选集合中的元素。这里使用sort方法对集合进行排序,括号内的Lambda表达式实现了Comparator接口的compare方法。Lambda表达式是Java 8新增的一个非常强大的特性。
2023-03-13 21:35:22
296
原创 Linux CentOS7下多机器集群安装Elasticsearch记录
部署机器主机名(hostname) IP 版本 master 192.168.0.112 CentOS Linux release 7.9.2009 (Core) node 192.168.0.113 CentOS Linux release 7.9.2009 (Core) 2台机器都进行以下安装步骤创建并进入目录mkdir /usr/local/elasticsearch ; cd /usr/local/elasticsearch下载安装
2022-01-28 14:56:25
1920
1
原创 etcd 2380: bind: cannot assign requested address
启动etcd时报错Job for etcd.service failed because the control process exited with error code. See "systemctl status etcd.service" and "journalctl -xe" for details.执行journalctl -xe查看错误详情找到原因后修改相应参数执行systemctl status etcd.service 查看etcd.service路径将ET
2022-01-27 15:39:13
4490
1
原创 linux报错:Please do not use uppercase letters in hostname: VM-0-10-centos
linux centos 报错:Please do not use uppercase letters in hostname: VM-0-10-centos原因是hostname不能使用大写在/etc/sysconfig/network中修改或添加下面配置HOSTNAME=新hostname保持后执行命令hostname 新hostname执行命令查看新的hostnamehostname...
2022-01-21 11:38:24
1220
1
原创 maven打包docker镜像时报错:Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed
[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.13:build (harbor) on project gateway: Could not build image: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: com.spotify.doc.
2022-01-19 10:54:36
5795
4
原创 错误:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running
执行docker ps时提示Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?可能是由于配置了远程访问导致/etc/systemd/system/multi-user.target.wants/docker.service 配置了远程访问追加配置 -H unix:///var/run/docker.sock再次执行命令重启docker即
2022-01-04 11:59:03
1610
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人