Ioc

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bean

type Bean interface {
	Name() string
}

接口所有可注入对象 Name 返回的的名字必须为类名 且类名不能重复

type Ioc

type Ioc struct {
	ExprData map[string]interface{} //保存对象 给表达式使用
}
var Instance *Ioc //单例

Ioc 容器 用于依赖注入

func New

func New() *Ioc

func (*Ioc) ApplyAll

func (this *Ioc) ApplyAll()

func (*Ioc) Beans

func (this *Ioc) Beans(beans ...Bean) *Ioc

func (*Ioc) Config

func (this *Ioc) Config(cfgs ...interface{}) *Ioc

func (*Ioc) Get added in v1.0.5

func (this *Ioc) Get(name interface{}) interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL