08 2020 档案
摘要:在项目文件夹中定义一个 Middleware 文件夹,建一个中间件类 using Microsoft.AspNetCore.Http; using System; using System.Collections.Generic; using System.Linq; using System.Th
阅读全文
摘要:先安装Ocelot.Provider.Polly 然后在Startup.CS .AddPolly(); using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; u
阅读全文
摘要:首先建 立一个.net Core WebAPi 项目 安装下面两个东西,注意版本 配置项目Startup.cs文件 using System; using System.Collections.Generic; using System.Linq; using System.Threading.Ta
阅读全文
摘要:1. Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 处理方法 service docker start
阅读全文
摘要:Centos7创建用户并授予sudo权限 创建用户:# adduser username 设置密码:# passwd username回车,顺序录入新密码及确认密码 授权sudo权限,需要修改sudoers文件。a. 首先找到文件位置,示例中文件在/etc/sudoers位置。whereis sud
阅读全文
该文被密码保护。
摘要:在环境GOPATH/src 里: go get github.com/dgrijalva/jwt-go 思路: 1.在登陆时,创建Tocken 2. 再次请求时,验证TOcken 实体代码 import "github.com/dgrijalva/jwt-go" // 建立统一标准需求 实体 typ
阅读全文
摘要:首先在本地编译项目 1. 在 项目目录下 SET CGO_ENABLED=0 SET GOOS=linux SET GOARCH=amd64 go build main.go 这样在main.go同目录下会生产main二进制文件 2. Dockerfile 文件配置 FROM scratch MAI
阅读全文