在網上搜索之后,發現session store type使用來存放session的存儲方式,目前Spring boot中只支持Redis方式。 由於本應用暫無需將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:
application.properties配置
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