Enables this
public String handleSomethingUsingSessionAttribute(
@RequestParam String param1,
@SessionAttribue AuthenticationToken token) {
// controller logic
}
- Specifying an attribute as Optional/Mandatory
- Specifying to create a new instance of parameter if not found in session
- Always create a new instance in session
deployed @ http://trail-blazer-app.robusta.cloudbees.net/
I would'nt advice using http session in building spring mvc based web and REST applications, but if you have to, do it annotation driven and test driven.License: Apache 2.0