摘要: 基础实现 requestInterceptor 实现类中添加信息 feign加入该config 开启 Hystrix 的情况下 开启hystrix后,feign请求,会运行在hystrix管理的另一线程下。 所以 无法获取值。 解决方法: 创建一个自定义的hystrix 线程策略 , 将 传入新线程 阅读全文
posted @ 2020-02-13 06:10 Jnew 阅读(3645) 评论(0) 推荐(0) 编辑
摘要: 恢复内容开始 github repository: apereo/cas 一,获取项目 链接:https://github.com/apereo/cas-overlay-template clone该项目。 切换到5.3分支。 安装maven依赖 二,overlay 配置文件 build 项目包 ( 阅读全文
posted @ 2019-09-05 13:58 Jnew 阅读(896) 评论(0) 推荐(0) 编辑
摘要: angular 自定义web组件: 首先创建一个名为myCustom的组件。 引入app.module: 全局注册: app.component: Ok,这样完成了'my-test'的全局,接下来可以像是用web component那样使用它了. 进入我们的主html: Index.html 注意: 阅读全文
posted @ 2018-04-15 14:31 Jnew 阅读(1532) 评论(0) 推荐(0) 编辑
摘要: 最近写了一套angular 组件,希望大家支持: Github: https://github.com/zhantewei2/ng-ztw webSite:http://39.108.193.57:3000 完整的angular组件解决方案,以后自己也会使用,还会不断更新。 欢迎pull reque 阅读全文
posted @ 2017-09-19 13:18 Jnew 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 这篇介绍一下,写一个自己的angular2滚动监听插件 目录结构: /scrollModule: ztw-scroll.module.ts; scrollBind.directive.ts; scroll.directive.ts; scroll.service.ts; 使用: ztw-scroll 阅读全文
posted @ 2017-02-05 17:37 Jnew 阅读(2740) 评论(1) 推荐(1) 编辑
摘要: 文章导航 1,koa2使用; 2,写中间件; 3,koa2路由配置angular2; 一。先上代码,一篇,看完koa2中大多基础方法: 二,自己写一个中间件; 比如我们只想对cookie进行加密和解密使用: myCookie.js: 在app.js中使用: 与普通ctx.cookies.set相同的 阅读全文
posted @ 2017-01-18 14:05 Jnew 阅读(2591) 评论(0) 推荐(0) 编辑
摘要: 尽管koa2中已经被async/await代替。但我还是想自个儿着写一个koa1中的generator。 一, 写这个之前,先写一个可以现实,express中next用法的函数: 使用: 二, 很成功。好了。下面写koa里的实现,就直接写function 了。这样写得快些 - -!。。: 使用: 返 阅读全文
posted @ 2017-01-14 22:03 Jnew 阅读(447) 评论(0) 推荐(0) 编辑
摘要: 版本:mongodb3.4。 User: mongodb使用验证登录;默认不开启,mongod中使用--auth开启: mongod -port=3000 --auth ; 基本方法: 具体roles:参见 在mongod开启验证前先在默认模式下,创建超级用户: mongo: use admin; 阅读全文
posted @ 2017-01-13 13:30 Jnew 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 版本:mongodb3.4; Index : 如果mongodb不能使用索引进行排序,就会将数据放入内存中进行排序,而当内存使用超过32MB时,就会报错。 在创建索引时,应确保索引的选择力,避免多余的查询。避免没有选择力的索引。 _id是默认的索引。 基本方法: db.collection.crea 阅读全文
posted @ 2017-01-13 12:52 Jnew 阅读(1275) 评论(0) 推荐(0) 编辑
摘要: 版本:mongodb3.4 ; 分片: 工作顺序:router=>config=>shards 一,配置config: 3.4中config必须为replSet。下面配置两个config。 mongod --configsvr -dbpath= .. -logpath=.. replSet=myCo 阅读全文
posted @ 2017-01-12 01:51 Jnew 阅读(583) 评论(0) 推荐(0) 编辑