1. SpringBoot启动类增加注解
  1. @EnableRedisHttpSession
  1. @SpringBootApplication
  2. @ImportResource({"classpath:config/applicationContext-xweb-dubbo.xml"
  3. ,"classpath:config/applicationContext-xweb.xml"
  4. ,"classpath:config/applicationContext-jedis.xml"})
  5. @Configuration
  6. @ComponentScan
  7. @EnableRedisHttpSession
  8. @EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class, RedisAutoConfiguration.class})
  9. public class XwebApplication extends WebMvcConfigurerAdapter {
  10.  
  11. }
  1. application.properties
  1. spring.redis.host=192.16.8.126
  2. spring.redis.port=6379
  3. spring.redis.password=cor2017
  1. pom.xml
  1. <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-redis</artifactId>
    </dependency>
    <dependency>
    <groupId>org.springframework.session</groupId>
    <artifactId>spring-session-data-redis</artifactId>
    <version>1.1.0.RELEASE</version>
    <type>pom</type>
    </dependency>

spring-boot Web集群的更多相关文章

  1. spring boot + quartz 集群

    spring boot bean配置: @Configuration public class QuartzConfig { @Value("${quartz.scheduler.insta ...

  2. 搭建高可用rabbitmq集群及spring boot实现集群配置

    java spring boot配置: //具体参看了配置的源码 org.springframework.boot.autoconfigure.amqp.RabbitProperties //Rabb ...

  3. haproxy+keepalived实现web集群高可用性[转]

    负载均衡集群的概念 负载均衡是设计分布式系统架构必须要考虑的因素之一,它指的是通过调度分发的方式尽可能将“请求”.“访问”的压力负载平均分摊到集群中的各个节点,避免有些节点负载太高导致访问延迟,而有些 ...

  4. Spring Cloud Eureka集群配置及注意事项(Greenwich版本)

    Spring Cloud Eureka集群配置及注意事项(Greenwich版本) 一·概述 Spring Cloud Netflix Eureka 是一个提供服务注册与发现的套件.服务提供者只需要将 ...

  5. Web集群缓存一致性的思考

    共享cache+数据库实现缓存一致性: 1.1 memcache + mongo+定时器 1.1.1 memcache 优点:web集群共享数据 缺点:数据生命周期的不可预估性 1.1.2 mongo ...

  6. 【转】web集群时session同步的3种方法

    转载请注明作者:海底苍鹰地址:http://blog.51yip.com/server/922.html 在做了web集群后,你肯定会首先考虑session同步问题,因为通过负载均衡后,同一个IP访问 ...

  7. 使用ARM和VMSS创建自动扩展的web集群

    在很多的商业场景中,用户的访问,峰值时间都是很难预测的,尤其是做一些市场推广活动和促销的时候,到底部署什么规模的web集群合适,这一直是个问题,部署过量会造成高成本和资源不必要的浪费,部署过少,如果到 ...

  8. Spring Boot Web Executable Demo

    Spring Boot Web Executable Demo */--> pre.src {background-color: #292b2e; color: #b2b2b2;} pre.sr ...

  9. Apache shiro集群实现 (八) web集群时session同步的3种方法

    Apache shiro集群实现 (一) shiro入门介绍 Apache shiro集群实现 (二) shiro 的INI配置 Apache shiro集群实现 (三)shiro身份认证(Shiro ...

  10. web集群时session同步的3种方法[转]

    在做了web集群后,你肯定会首先考虑session同步问题,因为通过负载均衡后,同一个IP访问同一个页面会被分配到不同的服务器上,如果session不同步的话,一个登录用户,一会是登录状态,一会又不是 ...

随机推荐

  1. pow(x,y)函数的实现算法(递归函数)

    函数pow(x,y)实现运算x^y,即x的y次方,这里x和y都为整数. 算法的基本思想是,减少乘法次数,重复利用结算结果,例如: x^4,如果逐个相乘的话,需要四次乘法.如果我们这样分解(x^2)*( ...

  2. ubuntu下禁用和恢复触摸板

    1.一般禁用选项在 settings > mouse and touchpad 中.(16.04通过实验)如果无法禁用或者希望恢复,向下看. 2.命令行键入: xinput ,插卡touchpa ...

  3. 分享一个mysql 复杂查询的例子

    发布:脚本学堂/MySQL  编辑:thebaby   2013-08-23 09:37:37  [大 中 小] 有关mysql复杂查询的一个例子,正在学习mysql的朋友,可以作为一个参考. 在my ...

  4. jQuery新建HTML Element

    举个例: 创建一个<i>HelloWorld.</i> var italicText = $("<i></i>").text(&qu ...

  5. rpc 理解

    RPC=Remote Produce Call 是一种技术的概念名词. HTTP是一种协议,RPC可以通过HTTP来实现,也可以通过Socket自己实现一套协议来实现. rpc是一种概念,http也是 ...

  6. telnet 登陆的方法

    第一种方式:通过inetd启动telnetd服务 必须这样设置busybox配置    Networking Utilities --->        去掉 [ ]   Support sta ...

  7. Dalvikvm工具

    dalvikvm:创建一个虚拟机并运行參数指定的java类. 1.新建一个java文件:例如以下: public class Test_07_22 { public static void main( ...

  8. 巨头们的GitHub仓库整理

    1.Google >1.Google >https://github.com/google >2.Google Samples https://github.com/googlesa ...

  9. css中!important的用法总结

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  10. 第二百六十九节,Tornado框架-Session登录判断

    Tornado框架-Session登录判断 Session需要结合cookie来实现 Session的理解 1.用户登录系统时,服务器端获取系统当前时间,进行nd5加密,得到加密后的密串 2.将密串作 ...