mardi 7 avril 2015

How to configure springConfig.java file to the junit

I am using SpringConfig.java this class is replaced with SpringConfig.xml and in this class I return



@Bean(name = "restTemplate")
public RestTemplate restTemplate() {
return new RestTemplate();

}



instead of writing <bean id="restTemplate" class="com.etc..."/>

and I am using @Autowired and I am using SpringJunit4Classrunner. how I can configure SpringConfig.java file to the test class or any other way is there way is they to configure.

Aucun commentaire:

Enregistrer un commentaire