fix: 机器文件内容写入导致内容清空、feat: ioc支持根据类型注入

This commit is contained in:
meilin.huang
2024-12-13 12:15:24 +08:00
parent e56788af3e
commit 7f2a49ba3c
31 changed files with 135 additions and 139 deletions

View File

@@ -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