- add example code - update pom dependency to spring boot starter 2.0.0.RC2 - update import in SpringApplicationException
18 lines
583 B
Java
18 lines
583 B
Java
package com.baeldung.sessionattrs;
|
|
|
|
import org.springframework.beans.factory.config.CustomScopeConfigurer;
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.context.support.SimpleThreadScope;
|
|
|
|
@Configuration
|
|
public class TestConfig {
|
|
|
|
@Bean
|
|
public CustomScopeConfigurer customScopeConfigurer() {
|
|
CustomScopeConfigurer configurer = new CustomScopeConfigurer();
|
|
configurer.addScope("session", new SimpleThreadScope());
|
|
return configurer;
|
|
}
|
|
}
|