org.unitils.spring.annotation
Annotation Type SpringBeanByName


@Target(value={FIELD,METHOD})
@Retention(value=RUNTIME)
public @interface SpringBeanByName

This annotation can be used on fields or setter methods, in order to inject a bean from a spring ApplicationContext. The id of the bean in the application context is automatically derived from the name of the field or setter method. An ApplicationContext has to be configured for this test using the SpringApplicationContext annotation.

Author:
Filip Neven, Tim Ducheyne



Copyright © 2011. All Rights Reserved.