Question

I want to make a full example integrating spring social and spring security using MongoDB , i need some examples , links or tuorials that help me to achieve that.

Thanks.

Was it helpful?

Solution

Official documentation is a right place to start. Both frameworks have default support for JDBC persistence. This support consist of two things : DB schema and couple of beans responsible for persistence. What you need to do is provide your own implementations for these beans and then configure both frameworks to use your beans. You need to implement following interfaces :

Check examples in the documentation, you'll find how to integrate your beans into frameworks. You will need additional beans if you want to use some features (like ACL in a case of Spring Security).

OTHER TIPS

For samples check spring official samples : https://github.com/spring-projects/spring-social-samples

Spring-social 1.1.0 does not support MongoDB yet to store tokens there are only support of JDBC via (JdbcConnectionRepository, JdbcUsersConnectionRepository) and in memory via (InMemoryConnectionRepository, InMemoryUsersConnectionRepository)

If you want use MongoDB you must implements your own repositories, here is some ways to do that :

https://www.jiwhiz.com/#/blogs/50f4f033e4b04d4d302ba03a

https://github.com/exacode/spring-social-mongodb

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top