Commit 6e183dae by 阳浪

配置信息

parent 2d3f0597
...@@ -83,4 +83,9 @@ ...@@ -83,4 +83,9 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<properties>
<!-- 跳过测试 -->
<skipTests>true</skipTests>
</properties>
</project> </project>
...@@ -2,6 +2,7 @@ package com.yizhi.library.application; ...@@ -2,6 +2,7 @@ package com.yizhi.library.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.cache.annotation.EnableCaching; import org.springframework.cache.annotation.EnableCaching;
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;
...@@ -14,7 +15,7 @@ import org.springframework.context.annotation.ComponentScan; ...@@ -14,7 +15,7 @@ import org.springframework.context.annotation.ComponentScan;
* @date 2019/7/1 * @date 2019/7/1
**/ **/
@SpringBootApplication @SpringBootApplication(exclude = {RabbitAutoConfiguration.class})
@EnableDiscoveryClient @EnableDiscoveryClient
@EnableCaching @EnableCaching
@EnableFeignClients(basePackages = {"com.yizhi"}) @EnableFeignClients(basePackages = {"com.yizhi"})
......
...@@ -24,7 +24,6 @@ import com.yizhi.system.application.system.remote.AccountClient; ...@@ -24,7 +24,6 @@ import com.yizhi.system.application.system.remote.AccountClient;
import com.yizhi.system.application.vo.AccountVO; import com.yizhi.system.application.vo.AccountVO;
import com.yizhi.util.application.event.TrainingProjectEvent; import com.yizhi.util.application.event.TrainingProjectEvent;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
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.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -56,9 +55,9 @@ public class StudentCaseController implements StudentCaseClient { ...@@ -56,9 +55,9 @@ public class StudentCaseController implements StudentCaseClient {
@Autowired @Autowired
private TaskExecutor taskExecutor; private TaskExecutor taskExecutor;
/*
@Autowired @Autowired
private AmqpTemplate amqpTemplate; private AmqpTemplate amqpTemplate;*/
@Autowired @Autowired
private StudentCaseServiceImpl studentCaseServiceImpl; private StudentCaseServiceImpl studentCaseServiceImpl;
...@@ -142,11 +141,11 @@ public class StudentCaseController implements StudentCaseClient { ...@@ -142,11 +141,11 @@ public class StudentCaseController implements StudentCaseClient {
public void handle() { public void handle() {
try { try {
amqpTemplate.convertAndSend(Constant.TRAINING_PROJECT_EVENT_QUEUE, /*amqpTemplate.convertAndSend(Constant.TRAINING_PROJECT_EVENT_QUEUE,
new EventWrapper<TrainingProjectEvent>(caseLibraryId, new EventWrapper<TrainingProjectEvent>(caseLibraryId,
TrainingProjectEvent.getInstance(caseLibraryId, Constant.CASELIBRARY_TRANINNING_TYPE, accountId, now, siteId, false TrainingProjectEvent.getInstance(caseLibraryId, Constant.CASELIBRARY_TRANINNING_TYPE, accountId, now, siteId, false
)) ))
); );*/
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
......
...@@ -46,7 +46,6 @@ import org.apache.commons.lang3.StringUtils; ...@@ -46,7 +46,6 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils; import org.apache.commons.lang3.math.NumberUtils;
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;
...@@ -108,9 +107,9 @@ public class StudentCaseServiceImpl extends ServiceImpl<StudentCaseMapper, Stude ...@@ -108,9 +107,9 @@ public class StudentCaseServiceImpl extends ServiceImpl<StudentCaseMapper, Stude
@Autowired @Autowired
private PointRedisFeignClients pointRedisFeignClients; private PointRedisFeignClients pointRedisFeignClients;
/*
@Autowired @Autowired
private AmqpTemplate amqpTemplate; private AmqpTemplate amqpTemplate;*/
@Autowired @Autowired
private ReportClient reportClient; private ReportClient reportClient;
...@@ -391,11 +390,11 @@ public class StudentCaseServiceImpl extends ServiceImpl<StudentCaseMapper, Stude ...@@ -391,11 +390,11 @@ public class StudentCaseServiceImpl extends ServiceImpl<StudentCaseMapper, Stude
public void handle() { public void handle() {
try { try {
amqpTemplate.convertAndSend(Constant.TRAINING_PROJECT_EVENT_QUEUE, /* amqpTemplate.convertAndSend(Constant.TRAINING_PROJECT_EVENT_QUEUE,
new EventWrapper<TrainingProjectEvent>(caseLibraryId, new EventWrapper<TrainingProjectEvent>(caseLibraryId,
TrainingProjectEvent.getInstance(caseLibraryId, Constant.CASELIBRARY_TRANINNING_TYPE, accountId, now, siteId, false TrainingProjectEvent.getInstance(caseLibraryId, Constant.CASELIBRARY_TRANINNING_TYPE, accountId, now, siteId, false
)) ))
); );*/
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
...@@ -789,11 +788,11 @@ public class StudentCaseServiceImpl extends ServiceImpl<StudentCaseMapper, Stude ...@@ -789,11 +788,11 @@ public class StudentCaseServiceImpl extends ServiceImpl<StudentCaseMapper, Stude
public void handle() { public void handle() {
try { try {
amqpTemplate.convertAndSend(Constant.TRAINING_PROJECT_EVENT_QUEUE, /* amqpTemplate.convertAndSend(Constant.TRAINING_PROJECT_EVENT_QUEUE,
new EventWrapper<TrainingProjectEvent>(studentCaseId, new EventWrapper<TrainingProjectEvent>(studentCaseId,
TrainingProjectEvent.getInstance(studentCaseId, Constant.STUDENTCASE_TRANINNING_TYPE, res.getAccountId(), now, res.getSiteId(), true TrainingProjectEvent.getInstance(studentCaseId, Constant.STUDENTCASE_TRANINNING_TYPE, res.getAccountId(), now, res.getSiteId(), true
)) ))
); );*/
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
...@@ -932,7 +931,7 @@ public class StudentCaseServiceImpl extends ServiceImpl<StudentCaseMapper, Stude ...@@ -932,7 +931,7 @@ public class StudentCaseServiceImpl extends ServiceImpl<StudentCaseMapper, Stude
//发送积分获取消息 //发送积分获取消息
if (null != sitePointId) { if (null != sitePointId) {
amqpTemplate.convertAndSend(MQqueuesEnum.CASELIBRARY.getKey(), sitePointId); // amqpTemplate.convertAndSend(MQqueuesEnum.CASELIBRARY.getKey(), sitePointId);
} }
} }
}); });
...@@ -948,11 +947,11 @@ public class StudentCaseServiceImpl extends ServiceImpl<StudentCaseMapper, Stude ...@@ -948,11 +947,11 @@ public class StudentCaseServiceImpl extends ServiceImpl<StudentCaseMapper, Stude
public void handle() { public void handle() {
try { try {
amqpTemplate.convertAndSend(Constant.TRAINING_PROJECT_EVENT_QUEUE, /* amqpTemplate.convertAndSend(Constant.TRAINING_PROJECT_EVENT_QUEUE,
new EventWrapper<TrainingProjectEvent>(finalCaseLibraryId1, new EventWrapper<TrainingProjectEvent>(finalCaseLibraryId1,
TrainingProjectEvent.getInstance(finalCaseLibraryId1, Constant.CASELIBRARY_TRANINNING_TYPE, finalAccountId1, now, siteId, true TrainingProjectEvent.getInstance(finalCaseLibraryId1, Constant.CASELIBRARY_TRANINNING_TYPE, finalAccountId1, now, siteId, true
)) ))
); );*/
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
......
server.port=34666 server.port=34666
spring.application.name=caselibrary spring.application.name=caselibrary
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
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
<repositories> <repositories>
<repository> <repository>
<id>learning-data-group</id> <id>hqzhdj-data-group</id>
<url>http://192.168.0.15:8081/repository/learning-data-group/</url> <url>http://192.168.0.15:8081/repository/hqzhdj-data-group/</url>
<releases> <releases>
<enabled>true</enabled> <enabled>true</enabled>
</releases> </releases>
......
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