去掉引入配置文件
This commit is contained in:
9
main.go
9
main.go
@@ -5,7 +5,6 @@ import (
|
|||||||
_ "github.com/george518/PPGo_Job/mail"
|
_ "github.com/george518/PPGo_Job/mail"
|
||||||
"github.com/george518/PPGo_Job/models"
|
"github.com/george518/PPGo_Job/models"
|
||||||
_ "github.com/george518/PPGo_Job/routers"
|
_ "github.com/george518/PPGo_Job/routers"
|
||||||
"os"
|
|
||||||
"github.com/george518/PPGo_Job/jobs"
|
"github.com/george518/PPGo_Job/jobs"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -15,15 +14,11 @@ const (
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
//初始化数据模型
|
//初始化数据模型
|
||||||
PP_PATH,_ := os.Getwd()
|
|
||||||
CONFIG := PP_PATH + "/config/app.conf"
|
|
||||||
beego.LoadAppConfig("ini", CONFIG)
|
|
||||||
models.Init()
|
models.Init()
|
||||||
jobs.InitJobs()
|
jobs.InitJobs()
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
beego.BConfig.WebConfig.Session.SessionOn = true
|
||||||
beego.Run()
|
beego.Run()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user