From 8a2cccea25b9eb92b2c472bb6871f48fe7a2c616 Mon Sep 17 00:00:00 2001 From: kzkzzzz Date: Fri, 10 Jun 2022 16:16:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=A1=A5=E5=85=85=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 - service/demo/config/config.yaml | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 service/demo/config/config.yaml diff --git a/.gitignore b/.gitignore index fdceac5..96f2a5d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,4 @@ tmp bin temp *.log -*.yaml .DS_Store \ No newline at end of file diff --git a/service/demo/config/config.yaml b/service/demo/config/config.yaml new file mode 100644 index 0000000..ef3be7b --- /dev/null +++ b/service/demo/config/config.yaml @@ -0,0 +1,24 @@ +Server: + Name: "service.demo" + ConsulServer: + - 192.168.233.1:8500 + Grpc: + Addr: "" # 为空随机端口, 使用注册中心服务发现 + Http: + Addr: "" + +Mysql: + dsn: remote:admin666@tcp(127.0.0.1:3306)/test?loc=Local&charset=utf8mb4&writeTimeout=3s&readTimeout=3s&timeout=1s&parseTime=true + MaxConn: 8 + MaxIdleConn: 2 + MaxLifetime: 1800 # 连接有效时间,单位秒 + Debug: true + +Redis: + Addr: 127.0.0.1:6379 + Password: "" + DB: 15 + +Log: + Color: true + Level: DEBUG \ No newline at end of file -- 2.22.0