方法注入在您不控制类的实例化时很有用。
Method injection can be useful if you don't control a class's instantiation.
Setter注入通过set()方法注入类型。
这种新的教学模式给现行的教学方法注入了全新的活力和提供了一个全新的视角。
This new teaching model has filled vitality into vocabulary teaching methods and provided a new perspective.
类型2设置器注入,使用者暴露一个设置器方法,框架将使用此方法注入依赖项。
Type 2 or setter injection, in which the dependent module exposes a setter method which the framework USES to inject the dependency.
另一种(也是使用更广的)行为是setter注入,在这种注入中,通过set方法注入依赖类。
The alternative (and more widely used) behavior is setter injection, where dependent classes are injected through set methods.
如果您有一个需要某些依赖项的超类,也可以使用方法注入(构造函数注入会使这种情况变得很复杂)。
You can also use it if you have a superclass that needs some dependencies. (Constructor injection makes this difficult.)
快乐体育教学思想和方法注入到学校体育教学中,能够充分调动学生学习体育的积极性,激发学生的学习兴趣和与参与愿望。
The idea and method of happy PE in college can enhance the students enthusiasm, interest in learning and eagerness in participance.
Spring支持三种依赖注入——setter、构造函数和方法注入——但总的来说,最流行的模型是setter注入。
Spring supports three types of dependency injection — setter, constructor, and method injection — but overall, the prevailing model is setter injection.
现在,这个问题已经通过将其直接注入细胞的方法解决了。如图所示,这是基因传递的一个问题。
Now, the problem is solved by injecting it directly into the cell. Shown here, that's one issue with gene delivery.
在这个方法中,我们可以在调用原方法之前或之后注入自己的代码。
In this method, custom code can be injected before or after invoking the original methods.
另外一种获得“非常及时”的注入的方式是使用一个查找方法。
Another way to get "just in time" injection is to use a lookup method.
这种方法消除了SQL注入攻击的可能性。
This method removes the potential for an SQL injection attack.
不管怎样,我们始终在猜测,这也是为什么夫妻们在使用“克林顿夫妇”的方法为婚姻注入激情前,应该先斟酌一下。
In the end we're still guessing, which is why couples should hesitate before attempting to inject some passion back into their marriage using the Clinton method.
把那些陈旧的、腐朽的、消极的能量统统找出来,然后打包扔掉! 这是给你的生活注入新鲜积极能量的最快的方法。
Declutter your life; the fastest way of attracting positive energy into your life is by stirring up stale, stagnant, negative energy and moving it out of your life.
要为中美洲经济注入更多活力,方法之一就是加强交通运输建设,同时削减繁文缛节。
One way of injecting more dynamism into Central America's economies would be by improving transport links and cutting red tape.
当下有一种方法是将简单粗糙的信息注入脑中。
There is a way to currently inject very crude signals into the brain.
注释的定义是为了控制方法参数和类成员的注入,它们在运行时的整个过程向应用程序提供了有价值的上下文信息。
Annotations are defined that govern injection of method parameters and class members, which provide valuable contextual information to applications during runtime.
这是抵御恶意SQL注入的有效方法。
This is an effective way to guard against malicious SQL injection.
以及最流行的注入攻击方法。
将来自uri或HTTP头部的元素作为方法参数注入。
Injecting elements from the URI or the HTTP header as method parameters.
在清单15中,Guice自动使用正确的参数注入provider方法。
Guice automatically injects the provider method in Listing 15 with the correct arguments.
为了方便这个setter注入,我为两个属性都注册了set方法。
To facilitate this setter injection, I've registered set methods for both my properties.
在IoC设置中,这些方面通常由一个ioc容器处理,比如,该容器通过调用setter方法将这些依赖项注入组件。
In an IoC setup, these aspects are normally handled by an IoC container that injects the dependencies into the component by calling a setter method, for example.
setUp方法实例化mock对象并将它注入到方面中。
The setUp method instantiates the mock object and injects it into the aspect.
依赖项注入可以通过多种方式进行,例如通过setter方法或类变量。
Dependency injection can occur in a variety of ways, such as through a setter method or a class variable.
ApacheWink运行时还可以将资产以参数的形式注入资源方法中。
The Apache Wink run time can also inject an asset into a resource method as a parameter.
如果您认为Guice访问私有方法不是很好,可以参见清单10,其中FrogMan使用了字段注入。
If you think Guice's decision to access private methods seems intrusive, wait until you see Listing 10, in which FrogMan USES field injection.
Tokenize Configuration,这个模式提供一种可重复的把可变信息注入配置文件中的方法
Tokenize Configuration, which provides a repeatable way of injecting variable information into configuration files
必须对注入的模块上下文调用方法。
必须对注入的模块上下文调用方法。
应用推荐