LANG

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>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>Greenwich.RELEASE</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-config</artifactId> </dependency> </dependencies>

Lang Java Spring Boot V2

JVM bind with IPv4 Disable IPv6 address lookups when -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Stack=true 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穿越Firewall

go模块代理 https://github.com/goproxy/goproxy.cn $go version go version go1.13.12 linux/amd64 go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.cn,direct 重置goproxy go env -w GOPROXY go doc https://golang.google.cn proxy 从 Github 的代码库 clone go get -u github.com/golang/text mv $GOPATH/src/github.com/golang/text $GOPATH/src/golang.org/x/text go get -u github.com/golang/crypto mv $GOPATH/src/github.com/golang/crypto $GOPATH/src/golang.org/x/crypto 设置 GOPROXY 环境变量配置代理 例如:GOPROXY=https://goproxy.io https://github.com/northbright/Notes/blob/master/Golang/china/get-golang-packages-on-golang-org-in-china.md https://gocn.vip/article/1678 配置代理 系统代理 GIT代理

Effective Coding

高效编程 JAVA PYTHON GO

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.

GO NOTES

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 基础 JAVA 基础

Java Notes

JVM MEMORY MODEL javax.net.ssl.SSLException: 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 是 否 否 否 方法签名 方法签名包括