mirror of
https://github.com/astaxie/beego.git
synced 2024-11-23 20:40:55 +00:00
change the globalInstance to read conf/app.conf
This commit is contained in:
parent
0958174bc8
commit
00ed1c3733
@ -519,7 +519,7 @@ func (c *IniConfigContainer) Unmarshaler(prefix string, obj interface{}, opt ...
|
|||||||
func init() {
|
func init() {
|
||||||
Register("ini", &IniConfig{})
|
Register("ini", &IniConfig{})
|
||||||
|
|
||||||
err := InitGlobalInstance("ini", "config/app.conf")
|
err := InitGlobalInstance("ini", "conf/app.conf")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logs.Warn("init global config instance failed. If you donot use this, just ignore it. ", err)
|
logs.Warn("init global config instance failed. If you donot use this, just ignore it. ", err)
|
||||||
}
|
}
|
||||||
|
@ -273,7 +273,6 @@ func (p *ControllerRegister) Include(cList ...ControllerInterface) {
|
|||||||
for _, f := range a.Filters {
|
for _, f := range a.Filters {
|
||||||
p.InsertFilter(f.Pattern, f.Pos, f.Filter, WithReturnOnOutput(f.ReturnOnOutput), WithResetParams(f.ResetParams))
|
p.InsertFilter(f.Pattern, f.Pos, f.Filter, WithReturnOnOutput(f.ReturnOnOutput), WithResetParams(f.ResetParams))
|
||||||
}
|
}
|
||||||
|
|
||||||
p.addWithMethodParams(a.Router, c, a.MethodParams, strings.Join(a.AllowHTTPMethods, ",")+":"+a.Method)
|
p.addWithMethodParams(a.Router, c, a.MethodParams, strings.Join(a.AllowHTTPMethods, ",")+":"+a.Method)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user