Question

I am new to spring security. I am building one application by using spring mvc 3 and hibernate. In My application user can access all the pages without logging in. But if he is making any transaction, he will be asked for Sign in. So can anyone help me to configure spring security only for some (transactional) requests.

It is something like online shopping cart.

Was it helpful?

Solution

Specific URL authorisation occurs at role or authority level.

Please review this section of the spring documentation:

http://docs.spring.io/spring-security/site/docs/3.2.3.RELEASE/reference/htmlsingle/#authorize-requests

For example on how it is done well please review this tutorial:

http://spring.io/guides/gs/securing-web/

and

http://spring.io/guides/tutorials/web/

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