示例#1
0
文件: init.go 项目: nangong92t/go_src
func init() {
	// revel.OnAppStart(InitDb)
	revel.InterceptMethod((*AbstractController).Begin, revel.BEFORE)
	revel.InterceptMethod((*AbstractController).Commit, revel.AFTER)
	revel.InterceptMethod((*AbstractController).Rollback, revel.FINALLY)
}
示例#2
0
文件: db.go 项目: nangong92t/go_src
func init() {
	revel.InterceptMethod((*Transactional).Begin, revel.BEFORE)
	revel.InterceptMethod((*Transactional).Commit, revel.AFTER)
	revel.InterceptMethod((*Transactional).Rollback, revel.FINALLY)
}