I have an application.properties file with the following:

```
retry.count = 3

```

Which is injected into a Spring MVC controller

```
@Value("${retry.count}")
private int retryCount;

try{
  invokeRestCall()
}
catch(TimeOutException ex){
  if(retryCount > 0) {
  retryCount--;
  //Retry call with recursion
  }
}

```

As retryCount is injected when application loads, and not session scoped, retryCount is shared across sessions and counter wouldn't work

Scope for beans can be defined by `@Scope(value="session")`, but this is not working with `@Value` attribute and shows an error "Scope cannot be defined for fields"

Is there any other way to make fields session scoped?