Commit adbfbd48 by 阳浪

配置信息

parent 95905b35
......@@ -2,6 +2,7 @@ package com.yizhi.application;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
......@@ -14,7 +15,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
*/
@EnableTransactionManagement
@EnableDiscoveryClient
@SpringBootApplication
@SpringBootApplication(exclude = {RabbitAutoConfiguration.class})
@EnableFeignClients(basePackages = {"com.yizhi"})
@ComponentScan(basePackages = {"com.yizhi"})
public class LecturerApplication {
......
......@@ -30,7 +30,6 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -65,8 +64,8 @@ public class LecturerImportServiceImpl implements ILecturerImportService {
@Autowired
private ILecturerRelationService lecturerRelationService;
@Autowired
private RabbitTemplate rabbitTemplate;
/*@Autowired
private RabbitTemplate rabbitTemplate;*/
public final String COURSE = "线上";
public final String OFFLINE_COURSE = "线下";
......@@ -183,7 +182,7 @@ public class LecturerImportServiceImpl implements ILecturerImportService {
models.remove(0);
//错误的信息发送给任务详情表
if (CollectionUtils.isNotEmpty(failEvents)) {
rabbitTemplate.convertAndSend(LogQueue.BATCH_TASK_LOG_DETAIL_QUEUE, failEvents);
// rabbitTemplate.convertAndSend(LogQueue.BATCH_TASK_LOG_DETAIL_QUEUE, failEvents);
}
} else {
......@@ -388,7 +387,7 @@ public class LecturerImportServiceImpl implements ILecturerImportService {
models.remove(0);
//错误的信息发送给任务详情表
if (CollectionUtils.isNotEmpty(failEvents)) {
rabbitTemplate.convertAndSend(LogQueue.BATCH_TASK_LOG_DETAIL_QUEUE, failEvents);
// rabbitTemplate.convertAndSend(LogQueue.BATCH_TASK_LOG_DETAIL_QUEUE, failEvents);
}
} else {
logger.info(ReturnCode.RESOURCE_NOT_FOUND.getMsg());
......
server.port=38001
spring.application.name=lecturer
ACTIVE=${spring.profiles.active}
spring.profiles.active=dev
spring.profiles.active=prod
# nacos
spring.cloud.nacos.config.shared-dataids=common-${spring.profiles.active}.properties
spring.cloud.nacos.config.namespace=${spring.profiles.active}
spring.cloud.nacos.config.prefix=${spring.application.name}
spring.cloud.nacos.config.file-extension=properties
spring.cloud.nacos.config.server-addr=192.168.1.22:3333
\ No newline at end of file
spring.cloud.nacos.config.server-addr=10.23.1.183:8848
\ No newline at end of file
......@@ -22,8 +22,8 @@
<repositories>
<repository>
<id>learning-data-group</id>
<url>http://192.168.0.15:8081/repository/learning-data-group/</url>
<id>hqzhdj-data-group</id>
<url>http://192.168.0.15:8081/repository/hqzhdj-data-group/</url>
<releases>
<enabled>true</enabled>
</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