随笔分类 - Java相关
摘要:1.编辑项目maven 配置文件。 <profile> <id>dev</id> <repositories> <repository> <!-- 增加elastic仓库 --> <id>elasticsearch-releases</id> <url>https://artifacts.elast
阅读全文
摘要:1.dockerFile定制镜像 定义一个nginx配置文件 FROM nginx RUN echo '这是一个本地构建的nginx镜像' > /usr/share/nginx/html/index.html [root@qicheng Dockerfile]# docker build -t ng
阅读全文
摘要:1.docker镜像使用 列出镜像 [root@qicheng /]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE ubuntu 15.10 a454816bdf34 2 minutes ago 0B ubuntu latest d70eaf
阅读全文
摘要:1.获取所有docker命令 docker 2.查询指定命令具体用法 docker node --help 3.通过容器获取ubuntu镜像 [root@qicheng ~]# docker pull ubuntuUsing default tag: latestlatest: Pulling fr
阅读全文
摘要:1.指定镜像运行一个程序 docker run ubuntu:15.10 /bin/echo "Hello world" 参数: docker: Docker 的二进制执行文件。 run: 与前面的 docker 组合来运行一个容器。 ubuntu:15.10 指定要运行的镜像,Docker 首先从
阅读全文
摘要:容器快速部署: 这里我们采用官网脚本快速安装: curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun 启动docker: sudo systemctl start docker 验证: sudo docker run h
阅读全文
摘要:http://192.168.8.236:8800/eureka/apps/HM-FINANCE-SERVICE/192.168.8.236:hm-finance-service:7012/status?value=DOWN
阅读全文
摘要:方法一:springboot提供函数,返回什么类型,对应就使用什么类型接受解析; List<Phone> query = jdbcTemplate.query(sql, new Object[]{mobile}, new BeanPropertyRowMapper(Phone.class)); 方法
阅读全文
摘要:方法1: 通过随机数从对象中获取 List<ExtensionDTO> extension = ucExtensionService.getExtersionByOrgCode(orgCode); log.info("机构绑定分机{}",extension); // 4.随机查找该部门下一个空闲分机
阅读全文
摘要:1.http代理, 反向代理 2. 负载均衡 nginx负载策略:内置:轮询、加权、ip hash Ip hash算法,对客户端请求的ip进行hash操作,然后根据hash结果将同一个客户端ip的请求分发给同一台服务器进行处理,可以解决session不共享的问题。 配置文件: #user nobod
阅读全文
摘要:配置文件: # For more information on configuration, see: # * Official English Documentation: http://nginx.org/en/docs/ # * Official Russian Documentation:
阅读全文
摘要:1.启动报错 Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" fo
阅读全文
摘要:1.登录redis [root@es ~]# redis-cli 127.0.0.1:6379> 2.认证 127.0.0.1:6379> AUTH xxxx OK 127.0.0.1:6379> 3.订阅1000这个消息 127.0.0.1:6379> SUBSCRIBE 1000 Reading
阅读全文
摘要:1. Java SE(Java Platform,Standard Edition)。Java SE 以前称为 J2SE。它允许开发和部署在桌面、服务器、嵌入式环境和实时环境中使用的 Java 应用程序。Java SE 包含了支持 Java Web 服务开发的类,并为 Java Platform,E
阅读全文
摘要:1.直接访问进入官网 https://www.elastic.co/cn/downloads/ 选择download,找到past releases 选择需要下载的版本 download就ok!
阅读全文
摘要:1.准备下载的jar包,或者本地项目打包好的jar包。 2.在当前jar包目录下执行执行如下命令:(本地已经安装了mavel坏境) mvn install:install-file -Dfile=gateway-sms-1.0.jar -DgroupId=com.message.gateway -D
阅读全文
摘要:1.进入git官网 https://git-scm.com/downloads 2.下载windos版本 3.下载完成后,指定安装目录一路Next。 4.安装完成后,打开git bash,输入如下命令,一路回车。 ssh-keygen -t rsa -C 'xxx@xxx.com' 'xxx@xxx
阅读全文
摘要:1.在系统目录下分别执行如下命令: cd /etc/yum.repos.d/ wget http://rpms.adiscon.com/v8-stable/rsyslog.repo yum install rsyslog yum install rsyslog 2.启动服务 systemctl st
阅读全文
摘要:文章链接来自:https://www.cnblogs.com/cxbhakim/p/9068833.html 一、keepalived服务 keepalived 是什么? Keepalived 一方面具有配置管理LVS的功能,同时还具有对LVS下面节点进行健康检查的功能,另一方面也可实现系统网络服务
阅读全文
摘要:1.PRIMARY KEY(主键索引) mysql>ALTER TABLE `table_name` ADD PRIMARY KEY ( `column` ) 2.UNIQUE(唯一索引) mysql>ALTER TABLE `table_name` ADD UNIQUE (`column` ) 3
阅读全文