mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-23 17:40:25 +08:00
feat: 新增简易版ioc
This commit is contained in:
@@ -14,8 +14,7 @@ type dbSqlAppImpl struct {
|
||||
base.AppImpl[*entity.DbSql, repository.DbSql]
|
||||
}
|
||||
|
||||
func newDbSqlApp(dbSqlRepo repository.DbSql) DbSql {
|
||||
app := new(dbSqlAppImpl)
|
||||
app.Repo = dbSqlRepo
|
||||
return app
|
||||
// 注入DbSqlRepo
|
||||
func (d *dbSqlAppImpl) InjectDbSqlRepo(repo repository.DbSql) {
|
||||
d.Repo = repo
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user