我试图获取我的安全上下文但它似乎存储在ThreadLocale中,因此每个查询都不同。
我读到默认情况下应该使用HttpSessionSecurityContextRepository,但显然不是这样:/
这是我的pom
<!-- Security -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>4.2.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>4.2.3.RELEASE</version>
</dependency>
有没有办法强制spring使用会话来存储和检索上下文?