IntelliJ IDEA 10 gives you an easy way of generating bean dependencies for Spring Test Contexts.
Simply hit Alt+Insert in your Spring Test to invoke the “Generate…” popup, select the “Bean dependency…” action to run and choose the beans you like.
IntelliJ IDEA actually runs a live template inside to complete the code generation. It creates
@Autowired field and adds
@Qualifier if more than one bean of the desired type is configured in test contexts.
It runs a live template and generates the
Try it in IntelliJ IDEA X EAP and let us know what you think.