Here is what I mean:

XML-Config
-----------
<beans>
<bean id="ABC" class="example.ABC"/>
<context:component-scan base-package="example"/>
</beans>

Java-Config
-----------
package example;

@Configuration
public class SimpleConfig
{
@Autowired
ApplicationContext ctx;

@Bean
public ABC abc()
{
return (ABC) ctx.getBean("ABC");
}
}
-----------
Will SimpleConfig.abc() successfully returns an ABC bean object. If not, what else do I have to do??