Commit 7b9e605b by 孙龙

Merge branch 'master' of http://119.23.72.7/mushishixian/search_server

# Conflicts:
#	bat/course.bat
parents 956e629b a20a53f6
set MICRO_REGISTRY=etcd set MICRO_REGISTRY=etcd
set MICRO_REGISTRY_ADDRESS=192.168.2.232:2379 set MICRO_REGISTRY_ADDRESS=192.168.2.232:2379
go run ../cmd/course_server.go --server_address :9091 go run ../cmd/course_server.go --server_address :9092
\ No newline at end of file \ No newline at end of file
...@@ -4,15 +4,16 @@ import ( ...@@ -4,15 +4,16 @@ import (
"search_server/pkg/config" "search_server/pkg/config"
"search_server/pkg/gredis" "search_server/pkg/gredis"
"search_server/pkg/logger" "search_server/pkg/logger"
"search_server/pkg/mysql"
) )
func Boot(configPath string) (err error) { func Boot(configPath string) (err error) {
if err = config.SetUp(configPath); err != nil { if err = config.SetUp(configPath); err != nil {
panic(err) panic(err)
} }
//if err = mysql.Setup(); err != nil { if err = mysql.Setup(); err != nil {
// return return
//} }
if err = gredis.Setup(); err != nil { if err = gredis.Setup(); err != nil {
return return
} }
......
...@@ -12,8 +12,9 @@ import ( ...@@ -12,8 +12,9 @@ import (
) )
func main() { func main() {
var path string var path string
flag.StringVar(&path, "config", "../conf/config.ini", "配置文件") flag.StringVar(&path, "config", "conf/config.ini", "配置文件")
flag.Parse() flag.Parse()
if err := boot.Boot(path); err != nil { if err := boot.Boot(path); err != nil {
log.Println(err) log.Println(err)
......
##bom_service 实现了bom的搜索 ##bom_service 实现了bom的搜索,接口如下
...@@ -19,6 +19,7 @@ require ( ...@@ -19,6 +19,7 @@ require (
github.com/joncalhoun/qson v0.0.0-20170526102502-8a9cab3a62b1 // indirect github.com/joncalhoun/qson v0.0.0-20170526102502-8a9cab3a62b1 // indirect
github.com/mholt/certmagic v0.9.3 // indirect github.com/mholt/certmagic v0.9.3 // indirect
github.com/micro/go-micro/v2 v2.9.0 github.com/micro/go-micro/v2 v2.9.0
github.com/micro/micro/v2 v2.9.1 // indirect
github.com/prometheus/client_golang v1.5.1 // indirect github.com/prometheus/client_golang v1.5.1 // indirect
github.com/prometheus/common v0.10.0 github.com/prometheus/common v0.10.0
github.com/prometheus/procfs v0.0.11 // indirect github.com/prometheus/procfs v0.0.11 // indirect
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
├── protos //原始的protos文件 ├── protos //原始的protos文件
├── service //业务逻辑操作所在目录 ├── service //业务逻辑操作所在目录
### 已经封装的模块以及用法 ### 已经封装的模块以及用法
#### 1.配置读取 #### 1.配置读取
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment