Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
log-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
log-platform
Commits
dde9042a
Commit
dde9042a
authored
Sep 30, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
业务日志添加
parent
2e35c33c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
55 deletions
+12
-55
log-manager/pom.xml
log-manager/pom.xml
+3
-2
log-manager/src/main/java/com/mortals/xhx/base/framework/config/RabbitConfig.java
...a/com/mortals/xhx/base/framework/config/RabbitConfig.java
+5
-6
log-manager/src/main/java/com/mortals/xhx/base/framework/listener/BizMessageConsumerListener.java
...x/base/framework/listener/BizMessageConsumerListener.java
+1
-1
log-manager/src/main/java/com/mortals/xhx/base/framework/listener/ErrorMessageConsumerListener.java
...base/framework/listener/ErrorMessageConsumerListener.java
+1
-1
log-manager/src/main/java/com/mortals/xhx/base/login/web/LoginController.java
.../java/com/mortals/xhx/base/login/web/LoginController.java
+2
-0
log-manager/src/main/resources/bootstrap.yml
log-manager/src/main/resources/bootstrap.yml
+0
-45
No files found.
log-manager/pom.xml
View file @
dde9042a
...
@@ -42,8 +42,8 @@
...
@@ -42,8 +42,8 @@
<profiles.log.level>
DEBUG
</profiles.log.level>
<profiles.log.level>
DEBUG
</profiles.log.level>
<profiles.log.path>
/logs
</profiles.log.path>
<profiles.log.path>
/logs
</profiles.log.path>
<profiles.data.path>
/data
</profiles.data.path>
<profiles.data.path>
/data
</profiles.data.path>
<profiles.nacos.server-addr>
192.168.0.252:8848
</profiles.nacos.server-addr>
<profiles.nacos.server-addr>
127.0.0.1:8848
</profiles.nacos.server-addr
>
<!-- <profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>--
>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
</properties>
</properties>
...
@@ -117,6 +117,7 @@
...
@@ -117,6 +117,7 @@
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-amqp
</artifactId>
<artifactId>
spring-boot-starter-amqp
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
...
...
log-manager/src/main/java/com/mortals/xhx/base/framework/config/RabbitConfig.java
View file @
dde9042a
...
@@ -135,16 +135,16 @@ public class RabbitConfig {
...
@@ -135,16 +135,16 @@ public class RabbitConfig {
@Override
@Override
public
void
fromClass
(
Class
<?>
aClass
,
MessageProperties
messageProperties
)
{
public
void
fromClass
(
Class
<?>
aClass
,
MessageProperties
messageProperties
)
{
//反序列化指定类路径
//反序列化指定类路径
if
(
messageProperties
.
getConsumerQueue
().
equalsIgnoreCase
(
QueueKey
.
ACCESS_LOG_QUEUE
))
{
/* if (messageProperties.getConsumerQueue().equalsIgnoreCase(QueueKey.ACCESS_LOG_QUEUE)) {
// messageProperties.setHeader("__TypeId__", "com.mortals.xhx.module.access.model.AccessLogEntity");
messageProperties.setHeader("__TypeId__", "java.lang.String");
}
else
if
(
messageProperties
.
getConsumerQueue
().
equalsIgnoreCase
(
QueueKey
.
BIZ_LOG_QUEUE
)){
}
else if(messageProperties.getConsumerQueue().equalsIgnoreCase(QueueKey.BIZ_LOG_QUEUE)){
messageProperties.setHeader("__TypeId__", "com.mortals.xhx.module.biz.model.BizLogEntity");
messageProperties.setHeader("__TypeId__", "com.mortals.xhx.module.biz.model.BizLogEntity");
}else if(messageProperties.getConsumerQueue().equalsIgnoreCase(QueueKey.ERROR_LOG_QUEUE)){
}else if(messageProperties.getConsumerQueue().equalsIgnoreCase(QueueKey.ERROR_LOG_QUEUE)){
messageProperties.setHeader("__TypeId__", "com.mortals.xhx.module.error.model.ErrorLogEntity");
messageProperties.setHeader("__TypeId__", "com.mortals.xhx.module.error.model.ErrorLogEntity");
}else if(messageProperties.getConsumerQueue().equalsIgnoreCase(QueueKey.OPERATION_LOG_QUEUE)){
}else if(messageProperties.getConsumerQueue().equalsIgnoreCase(QueueKey.OPERATION_LOG_QUEUE)){
messageProperties.setHeader("__TypeId__", "com.mortals.xhx.module.operate.model.OperateLogEntity");
messageProperties.setHeader("__TypeId__", "com.mortals.xhx.module.operate.model.OperateLogEntity");
}
}*/
}
}
@Override
@Override
...
@@ -161,7 +161,6 @@ public class RabbitConfig {
...
@@ -161,7 +161,6 @@ public class RabbitConfig {
}
}
return
String
.
class
;
return
String
.
class
;
}
}
});
});
return
jackson2JsonMessageConverter
;
return
jackson2JsonMessageConverter
;
}
}
...
...
log-manager/src/main/java/com/mortals/xhx/base/framework/listener/BizMessageConsumerListener.java
View file @
dde9042a
...
@@ -26,7 +26,7 @@ import java.util.stream.Collectors;
...
@@ -26,7 +26,7 @@ import java.util.stream.Collectors;
* @description:
* @description:
**/
**/
@Slf4j
@Slf4j
@Component
//
@Component
@RabbitListener
(
queues
=
QueueKey
.
BIZ_LOG_QUEUE
,
@RabbitListener
(
queues
=
QueueKey
.
BIZ_LOG_QUEUE
,
containerFactory
=
"consumerBatchContainerFactory"
)
containerFactory
=
"consumerBatchContainerFactory"
)
public
class
BizMessageConsumerListener
{
public
class
BizMessageConsumerListener
{
...
...
log-manager/src/main/java/com/mortals/xhx/base/framework/listener/ErrorMessageConsumerListener.java
View file @
dde9042a
...
@@ -32,7 +32,7 @@ import java.util.stream.Collectors;
...
@@ -32,7 +32,7 @@ import java.util.stream.Collectors;
* @description:
* @description:
**/
**/
@Slf4j
@Slf4j
@Component
//
@Component
@RabbitListener
(
queues
=
QueueKey
.
ERROR_LOG_QUEUE
,
@RabbitListener
(
queues
=
QueueKey
.
ERROR_LOG_QUEUE
,
containerFactory
=
"consumerBatchContainerFactory"
)
containerFactory
=
"consumerBatchContainerFactory"
)
public
class
ErrorMessageConsumerListener
{
public
class
ErrorMessageConsumerListener
{
...
...
log-manager/src/main/java/com/mortals/xhx/base/login/web/LoginController.java
View file @
dde9042a
...
@@ -61,9 +61,11 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
...
@@ -61,9 +61,11 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
String
loginName
=
loginForm
.
getLoginName
();
String
loginName
=
loginForm
.
getLoginName
();
String
password
=
loginForm
.
getPassword
();
String
password
=
loginForm
.
getPassword
();
UserPdu
userPdu
=
new
UserPdu
();
UserPdu
userPdu
=
new
UserPdu
();
// userPdu.initAttrValue();
userPdu
.
setLoginName
(
loginName
);
userPdu
.
setLoginName
(
loginName
);
userPdu
.
setPassword
(
password
);
userPdu
.
setPassword
(
password
);
String
resp
=
userFeign
.
portalLogin
(
userPdu
);
String
resp
=
userFeign
.
portalLogin
(
userPdu
);
//String resp="";
return
resp
;
return
resp
;
/* String securityCode = loginForm.getSecurityCode();
/* String securityCode = loginForm.getSecurityCode();
...
...
log-manager/src/main/resources/bootstrap.yml
View file @
dde9042a
...
@@ -15,8 +15,6 @@ spring:
...
@@ -15,8 +15,6 @@ spring:
serialization
:
serialization
:
WRITE_DATES_AS_TIMESTAMPS
:
true
WRITE_DATES_AS_TIMESTAMPS
:
true
default-property-inclusion
:
NON_NULL
default-property-inclusion
:
NON_NULL
# time-zone: GMT+8
# date-format: yyyy-MM-dd HH:mm:ss
redis
:
redis
:
host
:
@
profiles.redis.uri@
host
:
@
profiles.redis.uri@
port
:
@
profiles.redis.port@
port
:
@
profiles.redis.port@
...
@@ -77,48 +75,5 @@ application:
...
@@ -77,48 +75,5 @@ application:
upload
:
upload
:
path
:
@
profiles.filepath@
path
:
@
profiles.filepath@
#feign:
# hystrix:
# enabled: false
#queue:
# type: @profiles.queue.type@ # memory or kafka (Apache Kafka) or rabbitmq (RabbitMQ)
# core:
# topic: tb_core
# poll-interval: 25
# partitions: 10
# pack-processing-timeout: 2000
# in_memory:
# stats:
# print-interval-ms: 60000
# kafka:
# bootstrap.servers: @profiles.kafka.brokers@
# acks: all
# retries: 1
# batch.size: 16384
# linger.ms: 1
# buffer.memory: 33554432
# replication_factor: 1
# max_poll_interval_ms: 300000
# max_poll_records: 8192
# max_partition_fetch_bytes: 16777216
# fetch_max_bytes: 134217728
# use_confluent_cloud: false
# consumer-stats:
# enabled: true
# print-interval-ms: 60000
# kafka-response-timeout-ms: 1000
# rabbitmq:
# exchange_name: @profiles.rabbitmq.exchange@
# host: @profiles.rabbitmq.host@
# port: @profiles.rabbitmq.port@
# virtual_host: @profiles.rabbitmq.virtualhost@
# username: @profiles.rabbitmq.username@
# password: @profiles.rabbitmq.password@
# automatic_recovery_enabled: false
# connection_timeout: 5000
# handshake_timeout: 10000
# queue-properties:
# x-message-ttl: 86400000
# x-max-length-bytes: 1048576000
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