2019年6月17日
摘要: 1、JWT描述 Jwt token由Header、Payload、Signature三部分组成,这三部分之间以小数点”.”连接,JWT token长这样: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI 阅读全文
posted @ 2019-06-17 22:06 梦幻朵颜 阅读(1402) 评论(0) 推荐(0) 编辑
摘要: 本人一直有良好的写技术博文的习惯,最近研究 jwt 有点点心得,赶紧记下来。 我推荐使用jwt(Json Web Token)这种客户端存储状态方式,代替传统的服务端存储状态方式(比如redis存储session信息)。 推荐理由: 1、因为jwt提供了一整套客户端存储状态的解决方案。客户端存储用户 阅读全文
posted @ 2019-06-17 21:59 梦幻朵颜 阅读(394) 评论(0) 推荐(0) 编辑
摘要: jwt官网地址:https://jwt.io/ PS: 写此系列的时候,jjwt jar包版本是0.9.0 <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt</artifactId> <version>0.9.0</ve 阅读全文
posted @ 2019-06-17 21:55 梦幻朵颜 阅读(500) 评论(0) 推荐(0) 编辑
  2019年6月9日
摘要: 修改ES配置: 修改elasticsearch.yml,添加如下xpack配置: 然后重启ES集群 查看kibana里的监控 开启监控的重点是一定要加这个配置: 访问http://192.168.10.110:5601,点击菜单“Monitoring”: 查看节点状态 点击上图的Nodes: 3 阅读全文
posted @ 2019-06-09 21:16 梦幻朵颜 阅读(4876) 评论(0) 推荐(0) 编辑
摘要: pom.xml代码: application.properties配置文件代码: zipkin.storage.type前缀注入到zipkin-autoconfigure-storage-elasticsearch-http-2.8.4.jar包里的TracingZipkinElasticsearc 阅读全文
posted @ 2019-06-09 13:12 梦幻朵颜 阅读(6945) 评论(0) 推荐(0) 编辑
  2019年6月8日
摘要: 感谢此老兄:《手把手教你搭建一个 Elasticsearch 集群》 前提准备 安装kibana-6.7.0: 《Elasticsearch-6.7.0系列(三)5601端口 kibana——ES的UI界面》 升级前ES的license 升级之前访问:http://192.168.10.110:92 阅读全文
posted @ 2019-06-08 16:34 梦幻朵颜 阅读(11177) 评论(0) 推荐(0) 编辑
  2019年5月25日
摘要: ojdbc6.jar下载 Oracle官方宣布的Oracle数据库11g的驱动jar包是ojdbc6.jar ojdbc6.jar下载地址:https://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-09076 阅读全文
posted @ 2019-05-25 19:04 梦幻朵颜 阅读(7983) 评论(1) 推荐(1) 编辑
  2019年5月16日
摘要: 1、多级目录配置 多级目录是指像/html/mypage 等等配置: 2、root和alias的区别 感谢这位老兄: https://www.cnblogs.com/my_life/articles/7070805.html 《nginx配置 location root》 alias 指定的目录是准 阅读全文
posted @ 2019-05-16 23:32 梦幻朵颜 阅读(10658) 评论(1) 推荐(1) 编辑
  2019年4月28日
摘要: Dockerfile命令详解(超全版本) https://www.cnblogs.com/dazhoushuoceshi/p/7066041.html 案例1 dockerfile文件内容: FROM:指定容器运行的基础镜像MAINTAINER:告诉Docker该镜像的作者是谁COPY:把构建目录下 阅读全文
posted @ 2019-04-28 10:48 梦幻朵颜 阅读(423) 评论(0) 推荐(0) 编辑
  2019年4月20日
摘要: docker安装与启动 yum -y update 1、卸载老版本的 docker 及其相关依赖yum remove -y docker docker-common container-selinux docker-selinux docker-engine 2、安装 yum-utils,它提供了 阅读全文
posted @ 2019-04-20 22:13 梦幻朵颜 阅读(4843) 评论(0) 推荐(0) 编辑
  2019年4月6日
摘要: 官方英文文档地址:https://www.elastic.co/guide/index.html Elasticsearch博客目录 Elasticsearch-6.7.0系列(一)9200端口 .tar.gz版本centos7环境--下载安装运行 Elasticsearch-6.7.0系列(二)E 阅读全文
posted @ 2019-04-06 15:42 梦幻朵颜 阅读(338) 评论(0) 推荐(0) 编辑
  2019年4月5日
摘要: 重要提示 此文为入门级,需系统搭建ES集群的参考这里:《手把手教你搭建一个 Elasticsearch 集群》 尤其是需要设置集群的用户名密码访问的,查看http://yourIP:9200/_cluster/state?pretty确认xpack已安装:xpack.installed:"true" 阅读全文
posted @ 2019-04-05 21:58 梦幻朵颜 阅读(4150) 评论(0) 推荐(1) 编辑
  2019年4月4日
摘要: ruby安装参考博客:https://blog.csdn.net/yelllowcong/article/details/78362370 (Redis之集群redis-trib.rb环境的搭建-yellowcong) vi /etc/profile 修改环境变量,添加红色部分: source /e 阅读全文
posted @ 2019-04-04 09:47 梦幻朵颜 阅读(1515) 评论(0) 推荐(0) 编辑
  2019年4月2日
摘要: centos7环境 下载logstash wget https://artifacts.elastic.co/downloads/logstash/logstash-6.7.0.tar.gz 下载 logstash-sample.conf是默认配置文件,里面的默认端口是5044 tar -zxvf 阅读全文
posted @ 2019-04-02 17:17 梦幻朵颜 阅读(2606) 评论(0) 推荐(0) 编辑
  2019年4月1日
摘要: 前提 centos7环境 https://www.cnblogs.com/zhuwenjoyce/p/10629320.html elasticsearch搜索引擎 https://www.cnblogs.com/zhuwenjoyce/p/10633451.html 安装kibana UI系统 下 阅读全文
posted @ 2019-04-01 15:20 梦幻朵颜 阅读(1046) 评论(0) 推荐(0) 编辑
摘要: https://artifacts.elastic.co/downloads/kibana/kibana-6.7.0-linux-x86_64.tar.gz Kibana下载 有了elasticsearch,就必须按照Kibana,提供UI图形界面! 下载kibana curl -L -O http 阅读全文
posted @ 2019-04-01 14:32 梦幻朵颜 阅读(7363) 评论(0) 推荐(1) 编辑
  2019年3月31日
摘要: 卸载旧JDK版本 需卸载centos7自带的JDK1.7 rpm -qa|grep jdk 列出已安装jdk版本 rpm -e --nodeps java-1.7.0-openjdk-1.7.0.51-2.4.5.5.el7.x86_64 删除jdk第一个旧包 rpm -e --nodeps jav 阅读全文
posted @ 2019-03-31 19:12 梦幻朵颜 阅读(1370) 评论(0) 推荐(0) 编辑
摘要: https://www.elastic.co/guide/index.html(推荐) ES官方英文原版文档,一般会更新到最新版本 https://www.elastic.co/cn/downloads/ ES下载地址 https://www.cnblogs.com/zhuwenjoyce/p/10 阅读全文
posted @ 2019-03-31 18:59 梦幻朵颜 阅读(2992) 评论(0) 推荐(0) 编辑
  2019年3月24日
摘要: 感谢此兄: https://blog.51cto.com/huwei555/2341513?source=dra (centos7 安装rabbitmq 3.7) 以root用户登录。cd /home/soft 安装依赖包 yum -y updateyum install gcc gcc-c++ g 阅读全文
posted @ 2019-03-24 18:00 梦幻朵颜 阅读(1876) 评论(0) 推荐(0) 编辑
  2019年3月22日
摘要: nginx不支持主从,所以我们需要使用keepalive支持高可用。 keepalived重要知识点 在局域网内,每个主机上各安装一个keepalived,注意关闭防火墙firewalld,然后设定一个VIP(虚拟IP),主keepalived会获得授权在自己的主机上设置一个虚拟IP提供给应用层使用 阅读全文
posted @ 2019-03-22 10:01 梦幻朵颜 阅读(494) 评论(0) 推荐(0) 编辑
  2019年3月20日
摘要: 修改host文件,为最后访问域名准备 C:\Windows\System32\drivers\etc host文件目录192.168.10.140 www.joyce.com 在最后添加这个自定义域名 https公钥和私钥定义 服务端:公钥、私钥 服务器持有一对公钥和私钥,并且把自己的公钥发给客户端 阅读全文
posted @ 2019-03-20 11:25 梦幻朵颜 阅读(2641) 评论(0) 推荐(0) 编辑
  2019年3月19日
摘要: 第一步:server配置,指向负载均衡upstream1 server { listen 80; server_name www.xxx.com; location / { proxy_pass http://upstream1 使用哪个负载均衡 proxy_set_header Host $Hos 阅读全文
posted @ 2019-03-19 15:38 梦幻朵颜 阅读(434) 评论(0) 推荐(0) 编辑
摘要: 假设下面四种情况分别用 http://192.168.1.1/proxy/test.html 进行访问。 第一种:location /proxy/ { proxy_pass http:// 127.0.0.1/; 一般情况下不要在最后加上/,因为会去掉请求URL一部分。}代理到URL:http:// 阅读全文
posted @ 2019-03-19 15:09 梦幻朵颜 阅读(697) 评论(0) 推荐(0) 编辑
摘要: //如果这个启动类所在的包路径隐藏的很深,则需要指定扫描包。否则默认扫描启动类所在的子包路径下 @SpringBootApplication(scanBasePackages="com.joyce.users") public class MyApplication{ public static void main(String[] args){ Spr... 阅读全文
posted @ 2019-03-19 11:15 梦幻朵颜 阅读(5441) 评论(0) 推荐(0) 编辑
摘要: pom.xml配置添加main启动类: 到项目根目录下,执行cmd命令: mvn clean package -Dmaven.test.skip=true //先clean清除target目录下已经存在的jar或war或其他文件,然后package打包形成 jar 或 war,但不 install到 阅读全文
posted @ 2019-03-19 10:49 梦幻朵颜 阅读(16173) 评论(0) 推荐(1) 编辑
  2019年3月16日
摘要: nginx1.14.0下载及安装 wget http://nginx.org/download/nginx-1.14.0.tar.gztar -zxvf nginx-1.14.0.tar.gzcd nginx-1.14.0 下面的configure命令选择其中一种即可: ./configure -- 阅读全文
posted @ 2019-03-16 22:08 梦幻朵颜 阅读(5312) 评论(0) 推荐(0) 编辑
摘要: server配置demo 在192.168.10.140(centos7)上修改: /home/program/nginx/conf/nginx.conf 添加一个server cd /home/program/nginx/html mkdir domain //应用的静态资源文件所在路径 cd d 阅读全文
posted @ 2019-03-16 22:05 梦幻朵颜 阅读(1216) 评论(0) 推荐(0) 编辑
摘要: nginx日志打印 http属性log_format来设置日志格式 ,参考 https://www.jb51.net/article/52573.htm 《nginx日志配置指令详解》 log_format myformat '$remote_addr - $remote_user [$time_l 阅读全文
posted @ 2019-03-16 22:03 梦幻朵颜 阅读(1144) 评论(0) 推荐(0) 编辑
  2019年3月13日
摘要: 本文使用的是redis-4.0.13.tar.gz版本。 两个centos7系统虚拟机:192.168.10.140、192.168.10.150 redis各版本下载地址:http://download.redis.io/releases/ 单个redis下载、安装、启动、验证 在192.168. 阅读全文
posted @ 2019-03-13 21:39 梦幻朵颜 阅读(2985) 评论(0) 推荐(0) 编辑
  2019年3月6日
摘要: 找到mysql5.7安装的目录,我这里是:C:\Program Files\MySQL\MySQL Server 5.7 先停止mysql服务 在服务里找到MySQL57服务,停掉它。 修改my.ini 用管理员权限启动cmd命令窗口,很重要! 进入bin目录,拷贝my-default.ini 成m 阅读全文
posted @ 2019-03-06 23:27 梦幻朵颜 阅读(159) 评论(0) 推荐(0) 编辑
  2019年2月19日
摘要: 虚拟机centos7克隆一份出来之后,新centos7更改了固定IP,可是不生效。重启网卡时报错: network.service: control process exited, code=exited status=1 Failed to start LSB: Bring up/down net 阅读全文
posted @ 2019-02-19 23:02 梦幻朵颜 阅读(1648) 评论(0) 推荐(0) 编辑
  2019年2月17日
摘要: 基于git库的Spring Cloud Config配置中心代码demo下载地址:https://gitlab.com/mySpringCloud/config-git SpringBoot版本: 1.5.9.RELEASE SpringCloud版本:Edgware.RELEASE 1、Sprin 阅读全文
posted @ 2019-02-17 19:39 梦幻朵颜 阅读(2297) 评论(0) 推荐(0) 编辑
  2019年2月3日
摘要: pom里引用: 加密解密示例: 在atomikos里使用密码加密时,解密代码这样写: . 阅读全文
posted @ 2019-02-03 17:19 梦幻朵颜 阅读(2811) 评论(0) 推荐(0) 编辑
  2019年1月31日
摘要: 本文代码下载地址: https://gitlab.com/mySpringCloud/turbine SpringBoot版本:1.5.9.RELEASE (稳定版) SpringCloud版本:Edgware.RELEASE 启动微服务顺序是: joyce-eureka-server 注册中心 j 阅读全文
posted @ 2019-01-31 09:50 梦幻朵颜 阅读(605) 评论(0) 推荐(0) 编辑
  2019年1月20日
摘要: 项目中需要数据库分布式事物的实现,于是采用了atumikos技术。 因为生产上需要稳定,所以采用了springboot 1.5.9.RELEASE版本。 本文代码gitlab下载地址: https://gitlab.com/atomikos/springBootMultDB-druidOracle. 阅读全文
posted @ 2019-01-20 16:41 梦幻朵颜 阅读(3229) 评论(2) 推荐(0) 编辑
  2019年1月12日
摘要: 在实际开发过程中,我们需要详细到一一对应的版本关系:Spring 官方对应版本地址: (https://start.spring.io/actuator/info),建议用firefox浏览器打开,你会看见格式化好了json信息: 手动记录一些经本人实际验证可行的版本对应: 序号 版本对应 1 <s 阅读全文
posted @ 2019-01-12 21:56 梦幻朵颜 阅读(116219) 评论(5) 推荐(18) 编辑
  2018年12月23日
摘要: 我项目中一直使用这样的模板,留档,并纪念。 阅读全文
posted @ 2018-12-23 13:01 梦幻朵颜 阅读(1180) 评论(1) 推荐(2) 编辑
  2018年12月1日
摘要: 本文介绍的是nexus3.14.0版本在linux环境下安装、启动、搭建私库。 nexus3以上的版本太新了,网上很少介绍安装细节的。据了解和2.X版本有所不同了。 1、前提 linux机器上需先安装好jdk,并且配置好java环境变量。 安装好maven,并且配置好maven环境变量。 2、安装 阅读全文
posted @ 2018-12-01 20:39 梦幻朵颜 阅读(16659) 评论(0) 推荐(0) 编辑
  2018年9月26日
摘要: ScheduledFuture<?> result = executor.scheduleAtFixedRate(task,2, 5, TimeUnit.SECONDS); 在延迟2秒之后开始执行首个任务,之后每隔5秒执行一个任务,也就是固定间隔时间执行一次任务,而不是等到上个任务执行结束。 Sch 阅读全文
posted @ 2018-09-26 13:59 梦幻朵颜 阅读(891) 评论(0) 推荐(0) 编辑
  2018年9月17日
摘要: 在本文中说明了pom依赖可以支持什么功能,以及支持什么注解,引入该依赖可以在application.properties中添加什么配置。 1、SpringCloud 的pom依赖 <parent><groupId>org.springframework.boot</groupId><artifact 阅读全文
posted @ 2018-09-17 17:21 梦幻朵颜 阅读(15435) 评论(0) 推荐(0) 编辑