December 1st, 2007 by site admin
It looks like the spring 2.5 jars that where uploaded to the official maven repository are broken. The full spring jar is 321 kb large and only contains the spring aop classes.
Anyway I added springs own repository to my pom and then i got the correct jar and sources
<repository>
<id>spring</id>
<name>Spring Portfolio Repository</name> <url>https://springframework.svn.sourceforge.net/svnroot/springframework/repos/repo</url>
</repository>
Posted in java, spring |
3 Comments »
June 4th, 2006 by site admin
I just completed my first shot at integrating Spring with GWT. You can check it out here
Here’s what you do to expose a simple service.
1) Write the remote service, note that the service no longer extends RemoteServiceServlet however HelloService should still implement RemoteService
public class HelloServiceImpl implements HelloService {
public String sayHello(String name) {
return "hello " + name;
}
}
2) Define this service in your application context
<bean id=”helloService” class=”nl.jteam.hello.server.HelloServiceImpl”/>
3) expose the bean as a gwt service
<bean id=”defaultHandlerMapping” class=”org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping”/>
<bean name=”/helloService” class=”nl.jteam.gwt.exporter.GwtInvokerServiceExporter”>
<property name=”service” ref=”helloService”/>
<property name=”serviceInterface” value=”nl.jteam.hello.client.HelloService”/>
</bean>
4) Change the clientcode to point to your Spring service. be sure to use an absolute url while running in hosted mode or it will complain
helloService = (HelloServiceAsync) GWT.create(HelloService.class);
ServiceDefTarget endpoint = (ServiceDefTarget) helloService;
endpoint.setServiceEntryPoint("http://localhost:8080/helloservice");
Feedback is appreciated
Posted in java, spring |
14 Comments »