scphantm
scphantm

Reputation: 4563

Merging GWT and Spring Security/Spring MVC

I am working on a project that uses GWT for my front end, then the backend im using SpringMVC and im trying to merge in Spring Security and Spring Social. I found the library GWTSecurity here:

https://code.google.com/p/gwtsecurity/wiki/DesignConsideration

and it seems to make my life much more pleasant in stitching these things together. But I've run into a problem. This document seems to be very clear, for a system that is a single project. My particular project is split into two. One MVC project that will be hosted on Jetty on one box, and a second GWT project that will be hosted on an apache on a second box.

Does anyone know this tool well enough to tell me if I have to install spring in my GWT project to get the thing to work, or do i put all the context listeners listed in this document into my MVC project and it all just magically wire up?

Upvotes: 0

Views: 220

Answers (1)

Ümit
Ümit

Reputation: 17499

You don't need to have Spring in your GWT app. I am using Spring MVC and Spring Security together with GWT in one of my projects and I actually have 3 distinct maven modules (using Thomas Broyer's archetype):

  • server (Spring MVC, Spring Security)
  • shared (RequestFactory proxies, or shared classes)
  • client (GWT,etc)

I am not using GWTSecurity but are doing it manually. Actually GWT does not need to know anything about what kind of Security you have on the backend. I am using a dedicated login page.

What you probably have to do is to include the maven dependency to GWTSecurity to both your GWT (client) module and your Spring (server) module but you don't need to include the Spring module in your GWT module.

Upvotes: 1

Related Questions