mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 14:50:55 +00:00
AutoRender为空时,不再编译模版
AutoRender为空,Controller.Render()不再执行,故无需编译模版
This commit is contained in:
parent
4857e38471
commit
57fdc308e3
2
beego.go
2
beego.go
@ -307,12 +307,14 @@ func initBeforeHttpRun() {
|
|||||||
go GlobalSessions.GC()
|
go GlobalSessions.GC()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if AutoRender {
|
||||||
err := BuildTemplate(ViewsPath)
|
err := BuildTemplate(ViewsPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if RunMode == "dev" {
|
if RunMode == "dev" {
|
||||||
Warn(err)
|
Warn(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
registerDefaultErrorHandler()
|
registerDefaultErrorHandler()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user