Skip to content

Commit d9d50d3

Browse files
committed
代码优化
1 parent e6077c6 commit d9d50d3

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

eladmin-logging/src/main/java/me/zhengjie/service/impl/LogServiceImpl.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
import me.zhengjie.utils.*;
2929
import org.aspectj.lang.ProceedingJoinPoint;
3030
import org.aspectj.lang.reflect.MethodSignature;
31-
import org.slf4j.Logger;
32-
import org.slf4j.LoggerFactory;
3331
import org.springframework.data.domain.Page;
3432
import org.springframework.data.domain.Pageable;
3533
import org.springframework.stereotype.Service;
@@ -50,7 +48,6 @@
5048
@Service
5149
@RequiredArgsConstructor
5250
public class LogServiceImpl implements LogService {
53-
private static final Logger log = LoggerFactory.getLogger(LogServiceImpl.class);
5451
private final LogRepository logRepository;
5552
private final LogErrorMapper logErrorMapper;
5653
private final LogSmallMapper logSmallMapper;
@@ -125,7 +122,7 @@ private String getParameter(Method method, Object[] args) {
125122
argList.add(map);
126123
}
127124
}
128-
if (argList.isEmpty() == 0) {
125+
if (argList.isEmpty()) {
129126
return "";
130127
}
131128
return argList.size() == 1 ? JSONUtil.toJsonStr(argList.get(0)) : JSONUtil.toJsonStr(argList);

eladmin-system/src/main/java/me/zhengjie/config/ConfigurerAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public void configureMessageConverters(List<HttpMessageConverter<?>> converters)
7676
// 使用 fastjson 序列化,会导致 @JsonIgnore 失效,可以使用 @JSONField(serialize = false) 替换
7777
FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter();
7878
List<MediaType> supportMediaTypeList = new ArrayList<>();
79-
supportMediaTypeList.add(MediaType.APPLICATION_JSON_UTF8);
79+
supportMediaTypeList.add(MediaType.APPLICATION_JSON);
8080
FastJsonConfig config = new FastJsonConfig();
8181
config.setDateFormat("yyyy-MM-dd HH:mm:ss");
8282
config.setSerializerFeatures(SerializerFeature.DisableCircularReferenceDetect);

0 commit comments

Comments
 (0)