Spring in a GWT project?

I am developing a GWT-Spring-Hibernate project and I want to use Spring Auto-renewed annotation in the GWT Service Servlet, but my authorized annotated service is not entered. it is zero. Are there any configuration details that I skipped?

I add

<context:annotation-config />
<context:component-scan base-package="com.org" />

into my ApplicationContext.xml and I annotated my service as @Service ("myService")

@Autowired
MyService myService;  // This is null so WHY?
+3
source share
3 answers

Well, the class in which the annotation is located @Autowiredshould also be in the context of spring (i.e. annotated with @Component), but I doubt it will work if it is a GWT class (i.e. on the client side).

+2

, bean Spring? , .

, - "com.org" , @Component , Spring.

+1

Source: https://habr.com/ru/post/1723316/


All Articles