Commit 6769fea4 by 阳浪

配置信息

parent 79094d48
......@@ -2,13 +2,14 @@ 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.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableTransactionManagement
@SpringBootApplication
@SpringBootApplication(exclude = {RabbitAutoConfiguration.class})
@EnableDiscoveryClient
@EnableFeignClients(basePackages = {"com.yizhi"})
@ComponentScan(basePackages = {"com.yizhi"})
......
......@@ -24,7 +24,6 @@ import com.yizhi.point.application.vo.PointParamVO;
import org.apache.ibatis.session.RowBounds;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -64,8 +63,8 @@ public class CommentServiceImpl extends ServiceImpl<CommentMapper, NewComment> i
private ITaskAppendixService taskAppendixService;
@Autowired
private PointRedisFeignClients pointRedisFeignClients;
@Autowired
private AmqpTemplate amqpTemplate;
/*@Autowired
private AmqpTemplate amqpTemplate;*/
private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
private Logger logger = LoggerFactory.getLogger(CommentServiceImpl.class);
......@@ -639,7 +638,7 @@ public class CommentServiceImpl extends ServiceImpl<CommentMapper, NewComment> i
String sitePointId = pointRedisFeignClients.addPointRedis(pointParamVO);
// 发送积分
if (!StringUtils.isEmpty(sitePointId)) {
amqpTemplate.convertAndSend("forum", sitePointId);
// amqpTemplate.convertAndSend("forum", sitePointId);
}
}
});
......
server.port=39001
spring.application.name=comment
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,192.168.1.22:4444,192.168.1.22:5555
\ No newline at end of file
spring.cloud.nacos.config.server-addr=10.23.1.183:8848
\ 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