Skip to content

robusta-inc/spring-session-attribute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@SessionAttribute for Spring-Mvc

1. An annotation @SessionAttribute for Spring Mvc handler method parameters 2. An extensible Spring Mvc HandlerMethodArgumentResolver implementation
Enables this
  public String handleSomethingUsingSessionAttribute(
    @RequestParam String param1, 
    @SessionAttribue AuthenticationToken token) {
    
    // controller logic
  }
Options:
  1. Specifying an attribute as Optional/Mandatory
  2. Specifying to create a new instance of parameter if not found in session
  3. Always create a new instance in session
Continuous Integration
On travis - https://travis-ci.org/robusta-inc/spring-session-attribute
Maven artifacts
```xml org.springframework annotated-session-attribute 1.0-SNAPSHOT ``` available from https://repository-robusta.forge.cloudbees.com/snapshot
Sample App
https://github.com/robusta-inc/trail-blazer-webapp

deployed @ http://trail-blazer-app.robusta.cloudbees.net/

Note:
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

About

spring-mvc extension - annotation driven session attribute handling as web parameter resolver

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages