You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Alireza Fattahi <af...@yahoo.com> on 2013/08/17 14:42:42 UTC
Spring Anotaction with Strust
Hi,
May be this a spring question but please help me...
Consider the example:
http://struts.apache.org/release/2.2.x/docs/spring-and-struts-2.html
I want to use spring anotation for defining the beans.
So I make a EditServiceInMemory class as below:
@Configuration
public class EditServiceInMemory{
@Bean
public void editService() {
}
}
Accroding to spring above should be same as:
<bean id="editService" class="org.apache.struts.edit.service.EditServiceInMemory" />
But the anotation is not working!
Is is any thing regarding to spring plug in ?!
I also added the below in applicationContext.xml:
<context:annotation-config/>
~Regards,
~~Alireza Fattahi
Re: Spring Anotaction with Strust
Posted by Lukasz Lenart <lu...@apache.org>.
2013/8/17 Alireza Fattahi <af...@yahoo.com>:
> Hi,
> May be this a spring question but please help me...
> Consider the example:
> http://struts.apache.org/release/2.2.x/docs/spring-and-struts-2.html
>
> I want to use spring anotation for defining the beans.
> So I make a EditServiceInMemory class as below:
>
> @Configuration
> public class EditServiceInMemory{
Rather use @Service
> @Bean
> public void editService() {
hm.... method that doesn't return anything is annotated as Bean producer ;-)
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org