Hi
I have a web application up and running with annotation based services/components. The web app runs fine.
Now I am trying to load the same context in a standalone java application.
the configuration is loaded with the error belowCode:ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(new String[] {"spring/infrastructure-context.xml", "spring/services-context.xml"}); ctx.start();
No bean named 'groupDefinitionTagCreator' is defined
This bean is annotated with @Service("groupDefinitionTagCreator") and not defined in the xml configuration files.
How do I load my configuration that has annotated services.
BTW: my configuration works fine when run as a web app.
I tried to look for any other implementations of ApplicationContext some thing like AnnotationBasedApplicationContext but didnt find any.
Can somebody guide me how to achieve this?
// the following is the one that is failing to be initialized.
ThanksCode:<!-- Provides support for tagging audited entities --> <bean id="tagFactoryService" class="com.workscape.auditing.AuditTagFactoryImpl"> <property name="defaultTagCreator" ref="defaultTagCreator" /> <property name="tagCreatorMap"> <map> <entry key="com.workscape.em.model.GroupDefinition" value-ref="groupDefinitionTagCreator" /> // this is referring to a annotate service @Service("groupDefinitionTagCreator") ... ... ... </map> </property> </bean>
Srikanth


Reply With Quote
