mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-27 03:20:25 +08:00
* feat: 表格+表格元数据缓存 * feat:跳板机支持多段跳 * fix: 所有数据库区分字段主键和自增 * feat: DBMS支持mssql * refactor: 去除无用的getter方法
29 lines
710 B
Go
29 lines
710 B
Go
package application
|
|
|
|
import (
|
|
"mayfly-go/internal/sys/infrastructure/persistence"
|
|
"mayfly-go/pkg/ioc"
|
|
)
|
|
|
|
func InitIoc() {
|
|
persistence.Init()
|
|
|
|
ioc.Register(new(accountAppImpl), ioc.WithComponentName("AccountApp"))
|
|
ioc.Register(new(roleAppImpl), ioc.WithComponentName("RoleApp"))
|
|
ioc.Register(new(configAppImpl), ioc.WithComponentName("ConfigApp"))
|
|
ioc.Register(new(resourceAppImpl), ioc.WithComponentName("ResourceApp"))
|
|
ioc.Register(new(syslogAppImpl), ioc.WithComponentName("SyslogApp"))
|
|
}
|
|
|
|
func GetAccountApp() Account {
|
|
return ioc.Get[Account]("AccountApp")
|
|
}
|
|
|
|
func GetConfigApp() Config {
|
|
return ioc.Get[Config]("ConfigApp")
|
|
}
|
|
|
|
func GetSyslogApp() Syslog {
|
|
return ioc.Get[Syslog]("SyslogApp")
|
|
}
|