diff --git a/beego.go b/beego.go index 60483764..7bcc0740 100644 --- a/beego.go +++ b/beego.go @@ -306,11 +306,13 @@ func initBeforeHttpRun() { } go GlobalSessions.GC() } - - err := BuildTemplate(ViewsPath) - if err != nil { - if RunMode == "dev" { - Warn(err) + + if AutoRender { + err := BuildTemplate(ViewsPath) + if err != nil { + if RunMode == "dev" { + Warn(err) + } } }