Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
caselibrary
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
caselibrary
Commits
6e183dae
Commit
6e183dae
authored
Oct 18, 2024
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配置信息
parent
2d3f0597
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
21 deletions
+25
-21
library/pom.xml
+5
-0
library/src/main/java/com/yizhi/library/application/CaseLibraryApplication.java
+2
-1
library/src/main/java/com/yizhi/library/application/controller/StudentCaseController.java
+4
-5
library/src/main/java/com/yizhi/library/application/service/impl/StudentCaseServiceImpl.java
+9
-10
library/src/main/resources/bootstrap.properties
+3
-3
pom.xml
+2
-2
No files found.
library/pom.xml
View file @
6e183dae
...
...
@@ -83,4 +83,9 @@
</plugin>
</plugins>
</build>
<properties>
<!-- 跳过测试 -->
<skipTests>
true
</skipTests>
</properties>
</project>
library/src/main/java/com/yizhi/library/application/CaseLibraryApplication.java
View file @
6e183dae
...
...
@@ -2,6 +2,7 @@ package com.yizhi.library.application;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
...
...
@@ -14,7 +15,7 @@ import org.springframework.context.annotation.ComponentScan;
* @date 2019/7/1
**/
@SpringBootApplication
@SpringBootApplication
(
exclude
=
{
RabbitAutoConfiguration
.
class
})
@EnableDiscoveryClient
@EnableCaching
@EnableFeignClients
(
basePackages
=
{
"com.yizhi"
})
...
...
library/src/main/java/com/yizhi/library/application/controller/StudentCaseController.java
View file @
6e183dae
...
...
@@ -24,7 +24,6 @@ import com.yizhi.system.application.system.remote.AccountClient;
import
com.yizhi.system.application.vo.AccountVO
;
import
com.yizhi.util.application.event.TrainingProjectEvent
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.amqp.core.AmqpTemplate
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -56,9 +55,9 @@ public class StudentCaseController implements StudentCaseClient {
@Autowired
private
TaskExecutor
taskExecutor
;
/*
@Autowired
private
AmqpTemplate
amqpTemplate
;
private AmqpTemplate amqpTemplate;
*/
@Autowired
private
StudentCaseServiceImpl
studentCaseServiceImpl
;
...
...
@@ -142,11 +141,11 @@ public class StudentCaseController implements StudentCaseClient {
public
void
handle
()
{
try
{
amqpTemplate
.
convertAndSend
(
Constant
.
TRAINING_PROJECT_EVENT_QUEUE
,
/*
amqpTemplate.convertAndSend(Constant.TRAINING_PROJECT_EVENT_QUEUE,
new EventWrapper<TrainingProjectEvent>(caseLibraryId,
TrainingProjectEvent.getInstance(caseLibraryId, Constant.CASELIBRARY_TRANINNING_TYPE, accountId, now, siteId, false
))
);
);
*/
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
library/src/main/java/com/yizhi/library/application/service/impl/StudentCaseServiceImpl.java
View file @
6e183dae
...
...
@@ -46,7 +46,6 @@ import org.apache.commons.lang3.StringUtils;
import
org.apache.commons.lang3.math.NumberUtils
;
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
;
...
...
@@ -108,9 +107,9 @@ public class StudentCaseServiceImpl extends ServiceImpl<StudentCaseMapper, Stude
@Autowired
private
PointRedisFeignClients
pointRedisFeignClients
;
/*
@Autowired
private
AmqpTemplate
amqpTemplate
;
private AmqpTemplate amqpTemplate;
*/
@Autowired
private
ReportClient
reportClient
;
...
...
@@ -391,11 +390,11 @@ public class StudentCaseServiceImpl extends ServiceImpl<StudentCaseMapper, Stude
public
void
handle
()
{
try
{
amqpTemplate
.
convertAndSend
(
Constant
.
TRAINING_PROJECT_EVENT_QUEUE
,
/*
amqpTemplate.convertAndSend(Constant.TRAINING_PROJECT_EVENT_QUEUE,
new EventWrapper<TrainingProjectEvent>(caseLibraryId,
TrainingProjectEvent.getInstance(caseLibraryId, Constant.CASELIBRARY_TRANINNING_TYPE, accountId, now, siteId, false
))
);
);
*/
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -789,11 +788,11 @@ public class StudentCaseServiceImpl extends ServiceImpl<StudentCaseMapper, Stude
public
void
handle
()
{
try
{
amqpTemplate
.
convertAndSend
(
Constant
.
TRAINING_PROJECT_EVENT_QUEUE
,
/*
amqpTemplate.convertAndSend(Constant.TRAINING_PROJECT_EVENT_QUEUE,
new EventWrapper<TrainingProjectEvent>(studentCaseId,
TrainingProjectEvent.getInstance(studentCaseId, Constant.STUDENTCASE_TRANINNING_TYPE, res.getAccountId(), now, res.getSiteId(), true
))
);
);
*/
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -932,7 +931,7 @@ public class StudentCaseServiceImpl extends ServiceImpl<StudentCaseMapper, Stude
//发送积分获取消息
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
public
void
handle
()
{
try
{
amqpTemplate
.
convertAndSend
(
Constant
.
TRAINING_PROJECT_EVENT_QUEUE
,
/*
amqpTemplate.convertAndSend(Constant.TRAINING_PROJECT_EVENT_QUEUE,
new EventWrapper<TrainingProjectEvent>(finalCaseLibraryId1,
TrainingProjectEvent.getInstance(finalCaseLibraryId1, Constant.CASELIBRARY_TRANINNING_TYPE, finalAccountId1, now, siteId, true
))
);
);
*/
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
library/src/main/resources/bootstrap.properties
View file @
6e183dae
server.port
=
34666
spring.application.name
=
caselibrary
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
pom.xml
View file @
6e183dae
...
...
@@ -24,8 +24,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>
...
...
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