Hello,
I'm trying to port an existing application to JavaConfig. How do I enable the @Required annotation? In XML, I did so via the <context:annotation-config/> tag. My code is:
It's injecting properly into the config object, but ignoring the @Required in StartupParametersCode:@ContextConfiguration(locations = "mypackage.ApplicationConfig", loader = JavaConfigContextLoader.class) public class ReplicatedStoreTest extends AbstractTestNGSpringContextTests{ @Test public void test() { Assert.assertNotNull(config); } @Autowired StartupParameters config; }
Thanks in Advance,
Steven
Harvard Children's Hospital Informatics Program


