Tutorial about using Spring security for authorization
I'm new to Spring security, so I don't know how to get it setup and configured in my web application. Does anyone know of a good reference that explains the basics of Spring security and describes common usage scenarios? Ideally I'd like to find a tutorial that describes:
- setup and configuration for authentication and authorization
- using Hibernate to fetch authorities
- required depe开发者_StackOverflow社区ndencies
Read:
http://static.springsource.org/spring-security/site/docs/3.1.x/reference/ns-config.html
Sections 2.1 to 2.2.4 should have everything you need to get started.
The documentation mentioned above is pretty decent, but I've also found a tough time getting decent examples online.
In the end, me and a colleague of mine ended up getting this book: Spring Security 3, and we're glad we did. He has some good walk-throughs--the kind that seem to be lacking online.
Other than that, I think the best place to look is at code samples. Here's a link for the security samples on springsource.org. The 'contacts' sample is a decent place to start.
A colleague of mine suggested 5 min spring security blog link by the author of the Spring security book
In addition to the other great suggestions by posters, one online tutorial that I have seen that people like is the one at Heraclitus on Software - he/she has a 16 part tutorial complete with screen shots etc. Unfortunately it covers only Spring Sec 2.0, but many of the customization concepts will be similar in Spring Sec 3.0.
krams915 (a member of the Spring Security forums) also has a series of tutorials that he/she publishes on a regular basis, including some Spring Security 3 ones.
FWIW this question seems very similar to another SO question; there are many other links off of that question.
Read:
Basics of Spring Security
I have tried to explain the details to the very basics.
精彩评论