目前Spring boot的session的存储方式只支持Redis方式,在没有用到时,可以将session store type设置为none.
将此配置信息放入application.properites之中:
# default-store in spring session. it will be set in redis only outside.
spring.session.store-type=none
如果使用redis存储session:
spring.session.store-type=redis
并加入redis配置:
spring.redis.database=0
spring.redis.host=localhost
spring.redis.password=
spring.redis.pool.max-active=8
spring.redis.pool.max-idle=8
spring.redis.pool.max-wait=-1
spring.redis.pool.min-idle=0
spring.redis.port=6379