Refine the base bean.

This commit is contained in:
zicla
2019-04-28 01:29:13 +08:00
parent aaf7578290
commit e043b6b8d7
16 changed files with 36 additions and 36 deletions

View File

@ -3,7 +3,7 @@ package core
/**
* 系统中的Bean接口即系统中单例模式
*/
type IBean interface {
type Bean interface {
//初始化方法
Init()
//系统清理方法

View File

@ -14,7 +14,7 @@ type Context interface {
GetDB() *gorm.DB
//获取一个Bean
GetBean(bean IBean) IBean
GetBean(bean Bean) Bean
//获取全局的Session缓存
GetSessionCache() *cache.Table

View File

@ -3,7 +3,7 @@ package core
import "net/http"
type IController interface {
IBean
Bean
//注册自己固定的路由。
RegisterRoutes() map[string]func(writer http.ResponseWriter, request *http.Request)
//处理一些特殊的路由。