spring-boot Web集群
2024-10-20 16:30:30
SpringBoot启动类增加注解
@EnableRedisHttpSession
@SpringBootApplication
@ImportResource({"classpath:config/applicationContext-xweb-dubbo.xml"
,"classpath:config/applicationContext-xweb.xml"
,"classpath:config/applicationContext-jedis.xml"})
@Configuration
@ComponentScan
@EnableRedisHttpSession
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class, RedisAutoConfiguration.class})
public class XwebApplication extends WebMvcConfigurerAdapter { }
application.properties
spring.redis.host=192.16.8.126
spring.redis.port=6379
spring.redis.password=cor2017
pom.xml
<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>
最新文章
- matlab 将多个盒图放在一张图上
- .Net Task<;T>;的一种比较神奇的卡死情况(Wait/Result卡死, await能得到结果)
- ThinkPHP统一设置utf-8编码
- 1.5.8 语言分析器(Analyzer)
- HtmlAgilityPack相关网页
- 第三篇:gradle 编译 Android app 概览
- 取出当前会话的sid等
- iOS 相关职位要求整理版
- 某公司ASP.NET应聘上机试题
- Linux内核中链表实现
- git 客户端提交
- [LeetCode&;Python] Problem 53. Maximum Subarray
- zabbix_agent YUM源配置
- log4.net 配置-控制台输出带颜色的日志
- python + eclipse +pydev
- vue element-ui怎样提炼一个自己写的js当作公共js
- adb devices连接提示 Android offline或unauthorized的解决办法
- Android Security Internals
- C# .net MD5加密函数
- C++ STL的容器类型
热门文章
- [Jobdu] 题目1390:矩形覆盖
- tornado部署
- 每日英语:Yahoo&#39;s Rally: Made in China
- table中添加下拉框
- jquery 获取各种高宽
- Windows Phone 解析手机型号DeviceStatus.DeviceName
- 转:linux添加用户
- jQuery 中 attr() 和 prop() 方法的区别<;转>;
- codeforces 429 On the Bench dp+排列组合 限制相邻元素,求合法序列数。
- 微信小程序 - dialog