自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 收藏
  • 关注

原创 Java对象头详解

由于Java面向对象的思想,在JVM中需要大量存储对象,存储时为了实现一些额外的功能,需要在对象中添加一些标记字段用于增强对象功能,这些标记字段组成了对象头。1.对象头形式JVM中对象头的方式有以下两种(以32位JVM为例):1.1.普通对象|--------------------------------------------------------------|| Object Header (64 bits) ||

2020-07-01 10:48:28 186

原创 js Object 属性访问器

var get = function (obj, path, def) { /** * If the path is a string, convert it to an array * @param {String|Array} path The path * @return {Array} The path array */ var strin...

2019-12-20 09:35:04 248

原创 多版本node启动

//multinode.bat @echo offsetlocal enabledelayedexpansionrem Using pushd popd to set BASE_DIR to the absolute pathpushd %~dp0set BASE_DIR=%CD%popdset nodeV=%1set allparam=:paramset str=...

2019-12-16 12:07:41 191

原创 return all maximum values in a java stream

import java.util.ArrayList;import java.util.Comparator;import java.util.List;import java.util.stream.Collector;public final class CustomizeCollectors { private CustomizeCollectors() { }...

2019-11-27 16:17:22 122

原创 Visual studio code launch.json

{ "name": "Run API Repository", "type": "node", "request": "launch", "program": "${workspaceRoot}/api_repository/v1/app/api.js", "runtimeEx...

2019-11-11 15:35:39 470

原创 RestTemplate 实践

HttpClientConfigpackage com.config;import org.apache.http.HeaderElement;import org.apache.http.HeaderElementIterator;import org.apache.http.HttpResponse;import org.apache.http.client.config.Re...

2019-09-10 18:22:42 186

原创 Spring 自定义标签解析过程

1.入口DefaultBeanDefinitionDocumentReaderpublic BeanDefinition parseCustomElement(Element ele, @Nullable BeanDefinition containingBd) { //获取对应的命名空间 String namespaceUri = getNamespaceURI(ele...

2019-04-26 14:20:39 189

原创 XmlBeanDefinitionReader 处理过程

1.入口 /** * Load bean definitions from the specified XML file. * @param resource the resource descriptor for the XML file * @return the number of bean definitions found * @throws BeanDefinit...

2019-04-26 11:14:43 202

原创 golang 代理实现

拦截接口#invocation_handler.gopackage reflectype InvocationHandler interface { Invoke(proxy *Proxy, method *Method, args []interface{}) ([]interface{}, error)}代理#proxy.gopackage reflec...

2019-03-08 14:42:38 660

原创 react 与react-redux 实践

入口文件#index.jsimport React from 'react';import ReactDOM from 'react-dom';import App from './App';import * as serviceWorker from './serviceWorker';import { LocaleProvider } from 'antd';import...

2019-03-06 16:13:05 130

原创 npm 代理和仓库配置

#npmrc_auth = XXXXXXX //针对需要授权的仓库always-auth = true //针对需要授权的仓库registry=https://www.XXXX.net/artifactory/api/npm/npm/strict-ssl=falseemail=XXXX //可选loglevel=infoproxy=http://XXXXX:8092/https...

2019-03-05 14:06:19 1375

原创 go RPC 入门

服务端代码HelloService.gopackage mainimport ( "net/rpc" "net" "log")const HelloServiceName = "citi.com/api/HelloService"type HelloService interface { Hello(request string, reply *string)...

2019-01-02 11:28:48 161

原创 关于本地测试需要启动多个api的痛点解决

痛点来源本人参与的项目采用按业务分离的模式架构开发,每次测试时都需要在Visual Studio Code 中开多个powershell窗口启动多个服务,所以感觉比较痛苦,因为在windows上开发, 然后就想到了bat。实现细节bat 启动文件#cmd-api-start.bat@echo offset node=%NODE_HOME%\\node.exe:从ser...

2018-12-25 11:20:30 236

原创 Mongodb 索引优化建议

业务背景偶然的一次机会,听到我们项目的API 调用方说请求超时,server 返回500,经查验说是交易的collection数据量太大(超过100GB),而且每天通过spring batch新增80w数据量,目前表的数据量已经过亿,有同事分析了查询说是通过索引会扫描大量的无效数据(此处默认通过id 排序分页),然后只能强制删除了大部分数据(目前是30GB)。索引优化原先的查询语句如下...

2018-12-11 10:38:45 445

原创 Spring Cloud Feign

介绍Spring Cloud Feign 基于Netflix Feign 实现,整合了Spring Cloud Ribbon 和Spring Cloud Hystrix。简单使用#pom.xml <dependencies> <dependency> <groupId>org.springframework.boot</grou...

2018-11-28 16:11:48 101

原创 解决shell读取配置文件key带点号(.)的问题

传统source读取方式#application.propertiesdb.uat.user=userdb.uat.password=passworddb.uat.url=https://www.baidu.com#!/bin/shsource "application.properties"echo $db.uat.userecho $db.uat.password...

2018-11-25 13:35:48 1149

原创 RabbitMQ 的六种消息队列

1.简单模式1.1创建连接:1.2发送消息创建队列过程:1.3消费者2.Work模式一个生产者,多个消费者,每个消费者获取到的消息唯一。2.1 生产者 2.2 消费者12.3 消费者23. 订阅模式一个生产者发送的消息会被多个消费者获取。 生产者:可以将消息发送到队列或者是交换机。消费者:只能从队列中获取消息。...

2018-10-05 13:17:44 157

原创 Docker 安装 RabbitMQ

1.获取带有管理页面的rabbitmq镜像,此处选择rabbitmq:management,等待下载完成docker pull rabbitmq:management        2. 查看镜像是否已下载到本地docker images   3. 使用镜像生成容器docker run -d --name rabbitmq -...

2018-07-17 23:38:07 396

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除