beego.go
500 字节
package beego
import (
"github.com/astaxie/beego"
"github.com/linmadan/egglib-go/web/beego/filters"
. "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/log"
_ "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/port/beego/routers"
)
func init() {
beego.InsertFilter("/*", beego.BeforeExec, filters.CreateRequestBodyFilter())
beego.InsertFilter("/*", beego.BeforeExec, filters.CreateRequstLogFilter(Logger))
beego.InsertFilter("/*", beego.AfterExec, filters.CreateResponseLogFilter(Logger), false)
}