Add configuration and jars to middle tier jar or web app files
Just trying to figure out where I should put my configuration(s) for Spring Social.
Main thing is that we have a jar that includes our domain objects and our Spring Security UserDetails implementation. That jar is included in our core jar which are our middle tier beans, as well as our Spring Security UserDetailsService implementation. And then of course that is included in our war web apps modules/project.
So if I want my UserDetails to implement SocialUserDetails and my UserDetailsService to use, well not sure what it needs. I am also sure to use the Social filter that integrates with Spring Security.
Then there is the controllers which need to be in the web module.
Some of the beans will be in the parent middle tier ApplicationContext and the controllers in the WebApplicationContext.
So in the end, I guess I could add the Spring Social Core jar in my db and core modules. Leaving out any provider specific stufff. And then include core, provider specific stuff, web, etc in my web app war dependencies.
Then for the xml configuration, I will have to put Spring social xml config like
Code:
<util:property-placeholder location="classpath:META-INF/spring/social.properties"/>
<facebook:config app-id="${facebook.clientId}" app-secret="${facebook.clientSecret}" app-namespace="socialshowcase" />
<twitter:config app-id="${twitter.consumerKey}" app-secret="${twitter.consumerSecret}"/>
<social:jdbc-connection-repository data-source-ref="dataSource"/>
<bean id="userIdSource" class="org.springframework.social.config.xml.SpringSecurityAuthenticationNameUserIdSource" />
<bean id="psc" class="org.springframework.social.connect.web.ProviderSignInController" autowire="constructor" />
in my applicationContext.xml or my servletName-servlet.xml? Or do I have do put some in one and some in the other. I mean there is no reason to define beans of type Controller in the applicationContext.xml since that is the parent ApplicationContext.
Thanks for your help
Mark