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模块代理 $go version go version go1.13.12 linux/amd64 go env -w GO111MODULE=on go env -w GOPROXY=,direct 重置goproxy go env -w GOPROXY 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.


blank identifier To ignore one of the values, assign it to the blank identifier : links, _ := findLinks(url) // errors ignored for _, url := range os.Args[1:] { import ImportDeclaration = "import" ImportSpec ImportSpec = [ "." | "_" | Identifier ] ImportPath According to language spec it depends on the implementation how import path (string) is interpreted but in real life it’s path relative package’s vendor directory or go env GOPATH/src

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 是 否 否 否 方法签名 方法签名包括