Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lecturer
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
lecturer
Commits
adbfbd48
Commit
adbfbd48
authored
Oct 18, 2024
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配置信息
parent
95905b35
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
cloud-lecturer/src/main/java/com/yizhi/application/LecturerApplication.java
+2
-1
cloud-lecturer/src/main/java/com/yizhi/application/service/impl/LecturerImportServiceImpl.java
+4
-5
cloud-lecturer/src/main/resources/bootstrap.properties
+3
-3
pom.xml
+2
-2
No files found.
cloud-lecturer/src/main/java/com/yizhi/application/LecturerApplication.java
View file @
adbfbd48
...
...
@@ -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
{
...
...
cloud-lecturer/src/main/java/com/yizhi/application/service/impl/LecturerImportServiceImpl.java
View file @
adbfbd48
...
...
@@ -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
());
...
...
cloud-lecturer/src/main/resources/bootstrap.properties
View file @
adbfbd48
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
pom.xml
View file @
adbfbd48
...
...
@@ -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>
...
...
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