beego.go
520 字节
package appsvr
import (
"github.com/astaxie/beego"
. "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/log"
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr/middleware"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr/routers"
)
func init() {
beego.InsertFilter("/*", beego.BeforeExec, middleware.CreateRequestBodyFilter())
beego.InsertFilter("/*", beego.BeforeExec, middleware.CreateRequstLogFilter(Logger))
beego.InsertFilter("/*", beego.AfterExec, middleware.CreateResponseLogFilter(Logger), false)
}