guns 导出成war

1.打开右侧maven控制面板

2.保证没有依赖报错,如果有的请手动在pom.xml 中删除依赖

3.点击gun-parent

4.点击maven控制面板中的如下图标:

5.输入信息:

6.点击execute即可

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据提供的引用内容,我们可以得知guns redis集群的实现需要进行以下两个步骤: 1.在命令行中启动redis集群,具体步骤如下: ```shell # 下载redis源码 wget http://download.redis.io/releases/redis-5.0.5.tar.gz # 解压 tar xzf redis-5.0.5.tar.gz cd redis-5.0.5 # 编译 make # 启动redis集群 ./src/redis-trib.rb create --replicas 1 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 ``` 2.修改guns项目的配置文件,使其支持redis集群。具体步骤如下: 修改guns\guns-admin\src\main\resources\application.yml文件,添加以下配置: ```yaml spring: redis: cluster: nodes: - 127.0.0.1:7000 - 127.0.0.1:7001 - 127.0.0.1:7002 - 127.0.0.1:7003 - 127.0.0.1:7004 - 127.0.0.1:7005 ``` 修改guns\guns-admin\src\main\java\com\stylefeng\guns\config\web\WebConfig.java文件,启用RedisHttpSession: ```java @Configuration public class WebConfig extends WebMvcConfigurerAdapter { @Bean public RedisHttpSessionConfiguration redisHttpSessionConfiguration() { RedisHttpSessionConfiguration configuration = new RedisHttpSessionConfiguration(); configuration.setMaxInactiveIntervalInSeconds(1800); return configuration; } @Bean public JedisConnectionFactory connectionFactory() { JedisConnectionFactory connection = new JedisConnectionFactory(); connection.setHostName("127.0.0.1"); connection.setPort(6379); return connection; } @Bean public HttpSessionStrategy httpSessionStrategy() { return new HeaderHttpSessionStrategy(); } } ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值