|
@@ -1,13 +1,24 @@
|
|
|
package com.qqflow.engine.config;
|
|
package com.qqflow.engine.config;
|
|
|
|
|
|
|
|
|
|
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
|
|
|
|
+import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
|
|
|
|
+import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
|
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
|
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
|
|
|
|
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
|
|
+
|
|
|
@Configuration
|
|
@Configuration
|
|
|
public class WebConfig implements WebMvcConfigurer {
|
|
public class WebConfig implements WebMvcConfigurer {
|
|
|
|
|
|
|
|
|
|
+ @Bean
|
|
|
|
|
+ public Jackson2ObjectMapperBuilderCustomizer jsonCustomizer() {
|
|
|
|
|
+ return builder -> builder.serializers(
|
|
|
|
|
+ new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public void addCorsMappings(CorsRegistry registry) {
|
|
public void addCorsMappings(CorsRegistry registry) {
|
|
|
registry.addMapping("/**")
|
|
registry.addMapping("/**")
|