Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
comment-project
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
comment-project
Commits
6769fea4
Commit
6769fea4
authored
Oct 18, 2024
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配置信息
parent
79094d48
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
cloud-comment/src/main/java/com/yizhi/application/CommentApplication.java
+2
-1
cloud-comment/src/main/java/com/yizhi/application/service/impl/CommentServiceImpl.java
+3
-4
cloud-comment/src/main/resources/bootstrap.properties
+3
-3
No files found.
cloud-comment/src/main/java/com/yizhi/application/CommentApplication.java
View file @
6769fea4
...
...
@@ -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"
})
...
...
cloud-comment/src/main/java/com/yizhi/application/service/impl/CommentServiceImpl.java
View file @
6769fea4
...
...
@@ -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);
}
}
});
...
...
cloud-comment/src/main/resources/bootstrap.properties
View file @
6769fea4
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment