mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-04 00:10:25 +08:00
fix: 机器文件内容写入导致内容清空、feat: ioc支持根据类型注入
This commit is contained in:
@@ -72,7 +72,7 @@ type App[T model.ModelI] interface {
|
||||
|
||||
// 基础application接口实现
|
||||
type AppImpl[T model.ModelI, R Repo[T]] struct {
|
||||
Repo R // repo接口
|
||||
Repo R `inject:"T"` // repo接口, 根据类型进行注入
|
||||
}
|
||||
|
||||
// 获取repo
|
||||
|
||||
Reference in New Issue
Block a user