beego.go 568 字节
package appsvr

import (
	"github.com/astaxie/beego"
	"github.com/linmadan/egglib-go/web/beego/filters"
	. "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, filters.CreateRequestBodyFilter())
	beego.InsertFilter("/*", beego.BeforeExec, middleware.CreateRequstLogFilter(Logger))
	beego.InsertFilter("/*", beego.AfterExec, middleware.CreateResponseLogFilter(Logger), false)
}