diff --git a/go.mod b/go.mod index fd9d70aa1..4c37a2c14 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.11 require ( github.com/BurntSushi/toml v0.3.1 github.com/clbanning/mxj v1.8.4 - github.com/denisenkom/go-mssqldb v0.0.0-20200206145737-bbfc9a55622e // indirect github.com/fatih/structs v1.1.0 github.com/fsnotify/fsnotify v1.4.7 github.com/gf-third/mysql v1.4.2 diff --git a/net/ghttp/ghttp_server.go b/net/ghttp/ghttp_server.go index 82c83571d..1a55342db 100644 --- a/net/ghttp/ghttp_server.go +++ b/net/ghttp/ghttp_server.go @@ -11,6 +11,8 @@ import ( "errors" "fmt" "github.com/gogf/gf/debug/gdebug" + "github.com/gogf/gf/internal/intlog" + "github.com/gogf/gf/util/gutil" "net/http" "os" "reflect" @@ -338,7 +340,10 @@ func (s *Server) Start() error { } }) } - + if intlog.IsInGFDevelop() { + intlog.Print("server configuration:") + gutil.Dump(s.config) + } s.dumpRouterMap() return nil } diff --git a/net/ghttp/ghttp_server_config.go b/net/ghttp/ghttp_server_config.go index eb067c532..54fcbae86 100644 --- a/net/ghttp/ghttp_server_config.go +++ b/net/ghttp/ghttp_server_config.go @@ -139,6 +139,13 @@ func (s *Server) SetConfig(c ServerConfig) error { if c.ServerRoot != "" { s.SetServerRoot(c.ServerRoot) } + if len(c.SearchPaths) > 0 { + paths := c.SearchPaths + c.SearchPaths = []string{} + for _, v := range paths { + s.AddSearchPath(v) + } + } // HTTPS. if c.TLSConfig == nil && c.HTTPSCertPath != "" { s.EnableHTTPS(c.HTTPSCertPath, c.HTTPSKeyPath)