Lang Go Dep Manage

glide To upgrade dependencies, please make the necessary modifications in glide.yaml and run glide update.

Lang Java Spring Cloud

spring-cloud-greenwich-release To get started with Maven with a BOM (dependency management only): <dependencyManagement> <dependencies> <dependency> <groupId></groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>Greenwich.RELEASE</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId></groupId> <artifactId>spring-cloud-starter-config</artifactId> </dependency> </dependencies>

Lang Java Spring Boot V2

JVM bind with IPv4 Disable IPv6 address lookups when Spring Boot Actuator <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> Actuator comes with most endpoints disabled. Thus, the only two available by default are /health and /info. management.endpoints.web.exposure.include=* by default, all Actuator endpoints are now placed under the /actuator path mvn dependency:tree [INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.1.4.RELEASE:compile [INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:2.1.4.RELEASE:compile [INFO] | | +- org.springframework:spring-aop:jar:5.1.6.RELEASE:compile [INFO] | | \- org.


go doc proxy 从 Github 的代码库 clone go get -u mv $GOPATH/src/ $GOPATH/src/ go get -u mv $GOPATH/src/ $GOPATH/src/ 设置 GOPROXY 环境变量配置代理 例如:GOPROXY= 配置代理 系统代理 GIT代理

Effective Coding


Go Module

模块 A module is a collection of related Go packages that are versioned together as a single unit. Modules record precise dependency requirements and create reproducible builds. go.mod A module is defined by a tree of Go source files with a go.mod file in the tree’s root directory. Module source code may be located outside of GOPATH. There are four directives: module, require, replace, exclude. 显示当前的模块和依赖 go list -m all 显示特定模块的所有版本标签 go list -m -versions github.


How to check if a map contains a key func TestMap(t *testing.T){ attended := map[string]string{ "Ann": "t", "Joe": "r", } val, ok := attended["mm"] fmt.Print(val, ok) } if statements in Go can include both a condition and an initialization statement. The example above uses both: initializes two variables - val will receive either the value of “foo” from the map or a “zero value” (in this case the empty string) and ok will receive a bool that will be set to true if “foo” was actually present in the map

Effective Coding Java


Java Notes

JVM MEMORY MODEL Received fatal alert: protocol_version On Java 1.8 default TLS protocol is v1.2. On Java 1.6 and 1.7 default is obsoleted TLS1.0. I get this error on Java 1.8, because url use old TLS1.0 echo 'export JAVA_TOOL_OPTIONS="-Dhttps.protocols=TLSv1.2"' >> ~/.bashrc source ~/.bashrc 访问可见性 修饰符 类 包 子类 所有人 public 是 是 是 是 protected 是 是 是 否 没有修饰符 是 是 否 否 private 是 否 否 否 方法签名 方法签名包括