Commit 30f369b5 by 阳浪

配置信息

parent e361b04d
...@@ -2,6 +2,7 @@ package com.yizhi.application; ...@@ -2,6 +2,7 @@ package com.yizhi.application;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
...@@ -11,7 +12,7 @@ import org.springframework.context.annotation.ComponentScans; ...@@ -11,7 +12,7 @@ import org.springframework.context.annotation.ComponentScans;
* @Author: shengchenglong * @Author: shengchenglong
* @Date: 2018/3/6 14:29 * @Date: 2018/3/6 14:29
*/ */
@SpringBootApplication @SpringBootApplication(exclude = {RabbitAutoConfiguration.class})
@EnableDiscoveryClient @EnableDiscoveryClient
@EnableFeignClients(basePackages = {"com.yizhi"}) @EnableFeignClients(basePackages = {"com.yizhi"})
@ComponentScan(basePackages = {"com.yizhi"}) @ComponentScan(basePackages = {"com.yizhi"})
......
...@@ -27,7 +27,6 @@ import org.apache.commons.collections.CollectionUtils; ...@@ -27,7 +27,6 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -74,9 +73,9 @@ public class SignController { ...@@ -74,9 +73,9 @@ public class SignController {
@Autowired @Autowired
private PointRedisFeignClients pointRedisFeignClients; private PointRedisFeignClients pointRedisFeignClients;
/*
@Autowired @Autowired
private AmqpTemplate amqpTemplate; private AmqpTemplate amqpTemplate;*/
/** /**
* 学员端二维码签到 * 学员端二维码签到
......
...@@ -27,7 +27,6 @@ import org.apache.commons.collections.CollectionUtils; ...@@ -27,7 +27,6 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -74,9 +73,9 @@ public class RemoteSignController { ...@@ -74,9 +73,9 @@ public class RemoteSignController {
@Autowired @Autowired
private PointRedisFeignClients pointRedisFeignClients; private PointRedisFeignClients pointRedisFeignClients;
/*
@Autowired @Autowired
private AmqpTemplate amqpTemplate; private AmqpTemplate amqpTemplate;*/
/** /**
* 学员端二维码签到 * 学员端二维码签到
......
...@@ -29,7 +29,6 @@ import com.yizhi.training.application.vo.EvenType; ...@@ -29,7 +29,6 @@ import com.yizhi.training.application.vo.EvenType;
import com.yizhi.training.application.vo.domain.TrainingProjectVo; import com.yizhi.training.application.vo.domain.TrainingProjectVo;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -71,9 +70,9 @@ public class SignServiceImpl extends ServiceImpl<SignMapper, TrSign> implements ...@@ -71,9 +70,9 @@ public class SignServiceImpl extends ServiceImpl<SignMapper, TrSign> implements
private TrainingProjectClient trainingProjectClient; private TrainingProjectClient trainingProjectClient;
@Autowired @Autowired
private PointRedisFeignClients pointRedisFeignClients; private PointRedisFeignClients pointRedisFeignClients;
/*
@Autowired @Autowired
private AmqpTemplate amqpTemplate; private AmqpTemplate amqpTemplate;*/
@Autowired @Autowired
private AccountClient accountClient; private AccountClient accountClient;
...@@ -555,7 +554,7 @@ public class SignServiceImpl extends ServiceImpl<SignMapper, TrSign> implements ...@@ -555,7 +554,7 @@ public class SignServiceImpl extends ServiceImpl<SignMapper, TrSign> implements
sitePointId = pointRedisFeignClients.addPointRedis(pointParamVO); //调用积分接口添加积分 sitePointId = pointRedisFeignClients.addPointRedis(pointParamVO); //调用积分接口添加积分
} }
if (null != sitePointId) { if (null != sitePointId) {
amqpTemplate.convertAndSend("projectSign", sitePointId); //发送积分获取消息 // amqpTemplate.convertAndSend("projectSign", sitePointId); //发送积分获取消息
} }
} catch (Exception e) { } catch (Exception e) {
logger.error("项目签到积分发放失败:", e); logger.error("项目签到积分发放失败:", e);
......
server.port=39001 server.port=39002
spring.application.name=sign spring.application.name=sign
ACTIVE=${spring.profiles.active} ACTIVE=${spring.profiles.active}
spring.profiles.active=sit spring.profiles.active=prod
# nacos # nacos
spring.cloud.nacos.config.shared-dataids=common-${spring.profiles.active}.properties spring.cloud.nacos.config.shared-dataids=common-${spring.profiles.active}.properties
spring.cloud.nacos.config.namespace=${spring.profiles.active} spring.cloud.nacos.config.namespace=${spring.profiles.active}
spring.cloud.nacos.config.prefix=${spring.application.name} spring.cloud.nacos.config.prefix=${spring.application.name}
spring.cloud.nacos.config.file-extension=properties spring.cloud.nacos.config.file-extension=properties
spring.cloud.nacos.config.server-addr=192.168.1.13:3333,192.168.1.24:4444,192.168.1.38:5555 spring.cloud.nacos.config.server-addr=10.23.1.183:8848
ribbon.ReadTimeout=360000 ribbon.ReadTimeout=360000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment