Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
d9d50d35
Commit
d9d50d35
authored
Dec 04, 2021
by
Zheng Jie
Browse files
代码优化
parent
e6077c66
Changes
2
Hide whitespace changes
Inline
Side-by-side
eladmin-logging/src/main/java/me/zhengjie/service/impl/LogServiceImpl.java
View file @
d9d50d35
...
...
@@ -28,8 +28,6 @@ import me.zhengjie.service.mapstruct.LogSmallMapper;
import
me.zhengjie.utils.*
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.reflect.MethodSignature
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.stereotype.Service
;
...
...
@@ -50,7 +48,6 @@ import java.util.*;
@Service
@RequiredArgsConstructor
public
class
LogServiceImpl
implements
LogService
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
LogServiceImpl
.
class
);
private
final
LogRepository
logRepository
;
private
final
LogErrorMapper
logErrorMapper
;
private
final
LogSmallMapper
logSmallMapper
;
...
...
@@ -125,7 +122,7 @@ public class LogServiceImpl implements LogService {
argList
.
add
(
map
);
}
}
if
(
argList
.
isEmpty
()
==
0
)
{
if
(
argList
.
isEmpty
())
{
return
""
;
}
return
argList
.
size
()
==
1
?
JSONUtil
.
toJsonStr
(
argList
.
get
(
0
))
:
JSONUtil
.
toJsonStr
(
argList
);
...
...
eladmin-system/src/main/java/me/zhengjie/config/ConfigurerAdapter.java
View file @
d9d50d35
...
...
@@ -76,7 +76,7 @@ public class ConfigurerAdapter implements WebMvcConfigurer {
// 使用 fastjson 序列化,会导致 @JsonIgnore 失效,可以使用 @JSONField(serialize = false) 替换
FastJsonHttpMessageConverter
converter
=
new
FastJsonHttpMessageConverter
();
List
<
MediaType
>
supportMediaTypeList
=
new
ArrayList
<>();
supportMediaTypeList
.
add
(
MediaType
.
APPLICATION_JSON
_UTF8
);
supportMediaTypeList
.
add
(
MediaType
.
APPLICATION_JSON
);
FastJsonConfig
config
=
new
FastJsonConfig
();
config
.
setDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
config
.
setSerializerFeatures
(
SerializerFeature
.
DisableCircularReferenceDetect
);
...
...
Write
Preview
Supports
Markdown
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