取消Long型返回String

This commit is contained in:
sxu 2025-06-25 11:14:30 +08:00
parent 7afa5bacb9
commit a25c74a19b
1 changed files with 2 additions and 2 deletions

View File

@ -37,8 +37,8 @@ public class JacksonConfiguration {
@Bean @Bean
Jackson2ObjectMapperBuilderCustomizer objectMapperBuilderCustomizer() { Jackson2ObjectMapperBuilderCustomizer objectMapperBuilderCustomizer() {
return (builder) -> { return (builder) -> {
builder.serializerByType(Long.TYPE, LONG_STD_SERIALIZER); // builder.serializerByType(Long.TYPE, LONG_STD_SERIALIZER);
builder.serializerByType(Long.class, LONG_STD_SERIALIZER); // builder.serializerByType(Long.class, LONG_STD_SERIALIZER);
builder.locale(Locale.CHINA); builder.locale(Locale.CHINA);
builder.timeZone(TimeZone.getTimeZone(ZoneId.systemDefault())); builder.timeZone(TimeZone.getTimeZone(ZoneId.systemDefault()));
builder.simpleDateFormat("yyyy-MM-dd HH:mm:ss"); builder.simpleDateFormat("yyyy-MM-dd HH:mm:ss");