I've seen many examples of what is called Spring REST which basically all are simply Spring MVC. Granted that using JAXB, and JAXON you can provide XML, and JSON responses, but there is more to REST than just providing text response.
One major issue is that non of these examples mention anything about session; a REST application is supposed to be session-less, but Spring MVC is certainly session-full.
So, does Spring MVC somehow disables session, or are we supposed to disable session when we use Spring MVC to implement REST?
If we are supposed to disable session; then how is it that done?
Spring MVC does not enable sessions until you use them;
I fully agree that the so-called "rest support" in Spring should have been called "pretty urls and Jackson integration", but nowadays it has little market-appeal (even though pretty URLs and JSON are the only thing people associate with REST; that and mapping CRUD to http verbs).
REST is an architectural choice that has nothing to do with sessions (nor pretty urls, nor json). Since it is more of a religion than an actual technique, nobody will translate it for you to a fixed set of practices. You could have sessions modeled as resources that get created when user logs in and that disappear after some time. And so on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With