-
Dec 30th, 2009, 01:04 PM
#1
Are XML Config info and JavaConfig info visible to each other?
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??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules