SpringMVC使用Redis共享session

在使用之前,请确认项目已经整合了Redis

一、加入依赖

		<dependency>
			<groupId>org.springframework.session</groupId>
			<artifactId>spring-session-data-redis</artifactId>
		</dependency>

二、加入注解

在加了@SpringBootApplication注解的类加上以下注解

@EnableRedisHttpSession

没了。。。。

至于版本在阿里云仓库搜索就行

原文地址:https://www.cnblogs.com/mowen120/p/11958611.html