A session attribute is a pre-defined variable that is persistent throughout the life of a Tealeaf session. Session attributes can be used to store various data that may be referenced by events at any point during the session.Jan 24, 2565 BE
examine 2 different strategies for working with a session attribute:
Using a scoped proxy
Using the @SessionAttributes annotation
xxxxxxxxxx
@Bean
@Scope(
value = WebApplicationContext.SCOPE_SESSION,
proxyMode = ScopedProxyMode.TARGET_CLASS)
public TodoList todos() {
return new TodoList();
}