mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 08:20:25 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			560 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			560 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package application
 | 
						|
 | 
						|
import (
 | 
						|
	_ "mayfly-go/internal/msg/msgx/sender" // 注册消息发送器
 | 
						|
	"mayfly-go/pkg/ioc"
 | 
						|
)
 | 
						|
 | 
						|
func InitIoc() {
 | 
						|
	ioc.Register(new(msgAppImpl), ioc.WithComponentName("MsgApp"))
 | 
						|
	ioc.Register(new(msgChannelAppImpl), ioc.WithComponentName("MsgChannelApp"))
 | 
						|
	ioc.Register(new(msgTmplAppImpl), ioc.WithComponentName("MsgTmplApp"))
 | 
						|
	ioc.Register(new(msgTmplBizAppImpl), ioc.WithComponentName("MsgTmplBizApp"))
 | 
						|
}
 | 
						|
 | 
						|
func GetMsgApp() Msg {
 | 
						|
	return ioc.Get[Msg]("MsgApp")
 | 
						|
}
 | 
						|
 | 
						|
func GetMsgTmplApp() MsgTmpl {
 | 
						|
	return ioc.Get[MsgTmpl]("MsgTmplApp")
 | 
						|
}
 |