Putting an attribute in the session

Once we define an attribute in the @SessionAttributes annotation, it is automatically added to the session if the same attribute is added to the model.

In the preceding example, if we put an attribute with the name exampleSessionAttribute into the model, it would be automatically stored into the session conversation state:

    model.put("exampleSessionAttribute", sessionValue);
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset