配置pom

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.5.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Brixton.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-data-redis</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session</artifactId>
</dependency>
@SpringBootApplication
@EnableRedisHttpSession
public class App
{
public static void main( String[] args ){
SpringApplication.run(App.class, args);
}
}

注:如果使用 spring-session-data-redis 依赖方式,不需要加入@EnableRedisHttpSession

配置applicaton.yml

spring:
redis:
host: 192.168.99.100
port: 6379
password: a123

最新文章

  1. :before :after
  2. 5分钟windows wamp php安装phpunit 2015最新安装实践
  3. 根据显示的字符多少来做Label的自适应高度
  4. 区间dp笔记√
  5. java 类从哪个jar包加载的
  6. Write a beautiful button
  7. PHP IDE 框架 服务器 相关
  8. 在网页中使用javascript提供反馈信息
  9. .NET和JAVA 反射对比
  10. poj 3687 Labeling Balls(拓补排序)
  11. flex 1与flex auto
  12. SDWebImage之SDWebImageDownloaderOperation
  13. idea模板注释
  14. Spring 整合 Junit4 进行单元测试
  15. EF中的预先加载和延迟加载
  16. Thinkphp 缓存和静态缓存局部缓存设置
  17. 三个支持正则表达式的行处理的工具: grep/sed/awk
  18. 使用InputStreamReader读入,使用OutputStreamWriter写出,将一首诗按行重写?
  19. OOM问题定位方法
  20. fold change的意义[转载]

热门文章

  1. 笔记:Javac编译器
  2. Servlet的HTTP状态码
  3. linux shell学习一点点
  4. Guass列主元、平方根法、追赶法求解方程组的C++实现
  5. C/C++综合測试题(四)
  6. Android多媒体-MediaPlayer唤醒锁及音频焦点
  7. SSL和SSH的差别
  8. IOS-Storyboard控制器切换之TabBar(3)
  9. [计算机故障处理]EXCEL文件双击不能直接打开
  10. asp.net mvc 的 视图(view )的模块化开发