Description

Include will generate router file in the router/xxx.go from the controller's comments usage: beego.Include(&BankAccount{}, &OrderController{},&RefundController{},&ReceiptController{}) type BankAccount struct{

beego.Controller

}

register the function func (b *BankAccount)Mapping(){

b.Mapping("ShowAccount" , b.ShowAccount)
b.Mapping("ModifyAccount", b.ModifyAccount)

}

[email protected] /account/:id [get] func (b *BankAccount) ShowAccount(){

//logic

}

[email protected] /account/:id [post] func (b *BankAccount) ModifyAccount(){

//logic

}

the comments @router url methodlist url support all the function Router's pattern methodlist [get post head put delete options *]