Commit 8dec8170 by 阳浪

配置信息

parent 85d2b3e4
package com.yizhi.application; package com.yizhi.application;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication @SpringBootApplication(exclude = {RabbitAutoConfiguration.class})
@EnableCaching @EnableCaching
@EnableFeignClients(basePackages = {"com.yizhi"}) @EnableFeignClients(basePackages = {"com.yizhi"})
@ComponentScan(basePackages = {"com.yizhi"}) @ComponentScan(basePackages = {"com.yizhi"})
......
...@@ -21,7 +21,6 @@ import com.yizhi.util.application.event.TrainingProjectEvent; ...@@ -21,7 +21,6 @@ import com.yizhi.util.application.event.TrainingProjectEvent;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.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.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
...@@ -71,9 +70,9 @@ public class ExamQuestionController { ...@@ -71,9 +70,9 @@ public class ExamQuestionController {
@Autowired @Autowired
private PointRedisFeignClients pointRedisFeignClients; private PointRedisFeignClients pointRedisFeignClients;
/*
@Autowired @Autowired
private AmqpTemplate amqpTemplate; private AmqpTemplate amqpTemplate;*/
@Autowired @Autowired
private TaskExecutor taskExecutor; private TaskExecutor taskExecutor;
...@@ -1275,10 +1274,10 @@ public class ExamQuestionController { ...@@ -1275,10 +1274,10 @@ public class ExamQuestionController {
} }
String sitePointId1 = pointRedisFeignClients.addPointRedis(pointParamVO); //调用积分接口添加积分 String sitePointId1 = pointRedisFeignClients.addPointRedis(pointParamVO); //调用积分接口添加积分
if (null != sitePointId) { if (null != sitePointId) {
amqpTemplate.convertAndSend(MQqueuesEnum.EXAM.getKey(), sitePointId); //发送积分获取消息 //amqpTemplate.convertAndSend(MQqueuesEnum.EXAM.getKey(), sitePointId); //发送积分获取消息
} }
if (null != sitePointId1) { if (null != sitePointId1) {
amqpTemplate.convertAndSend(MQqueuesEnum.EXPERIENCEEXAM.getKey(), sitePointId1); //发送经验获取消息 // amqpTemplate.convertAndSend(MQqueuesEnum.EXPERIENCEEXAM.getKey(), sitePointId1); //发送经验获取消息
} }
} }
} catch (Exception e) { } catch (Exception e) {
......
...@@ -24,7 +24,6 @@ import org.apache.poi.ss.util.CellRangeAddress; ...@@ -24,7 +24,6 @@ import org.apache.poi.ss.util.CellRangeAddress;
import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.map.ObjectMapper;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
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.Component; import org.springframework.stereotype.Component;
...@@ -51,9 +50,9 @@ public class ExamAnswerExport extends AbstractDefaultTask<String, Map<String, Ob ...@@ -51,9 +50,9 @@ public class ExamAnswerExport extends AbstractDefaultTask<String, Map<String, Ob
@Autowired @Autowired
LogEventPublisher publisher; LogEventPublisher publisher;
/*
@Autowired @Autowired
RabbitTemplate rabbitTemplate; RabbitTemplate rabbitTemplate;*/
@Autowired @Autowired
IExamReportService iExamReportService; IExamReportService iExamReportService;
......
server.port=34001 server.port=34001
spring.application.name=exam spring.application.name=exam
ACTIVE=${spring.profiles.active} ACTIVE=${spring.profiles.active}
spring.profiles.active=dev 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.22:3333,192.168.1.22:4444,192.168.1.22:5555 spring.cloud.nacos.config.server-addr=10.23.1.183:8848
\ No newline at end of file \ No newline at end of file
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