Subversion Repositories SmartDukaan

Rev

Rev 26863 | Rev 27113 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 26863 Rev 27014
Line 6... Line 6...
6
import org.apache.logging.log4j.Logger;
6
import org.apache.logging.log4j.Logger;
7
import org.springframework.beans.factory.annotation.Autowired;
7
import org.springframework.beans.factory.annotation.Autowired;
8
import org.springframework.context.annotation.Bean;
8
import org.springframework.context.annotation.Bean;
9
import org.springframework.context.annotation.ComponentScan;
9
import org.springframework.context.annotation.ComponentScan;
10
import org.springframework.context.annotation.Configuration;
10
import org.springframework.context.annotation.Configuration;
-
 
11
import org.springframework.http.MediaType;
11
import org.springframework.http.converter.HttpMessageConverter;
12
import org.springframework.http.converter.HttpMessageConverter;
12
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
13
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
-
 
14
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
13
import org.springframework.web.servlet.config.annotation.CorsRegistry;
15
import org.springframework.web.servlet.config.annotation.CorsRegistry;
14
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
16
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
15
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
17
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
16
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
18
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
17
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
19
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
Line 119... Line 121...
119
	    objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
121
	    objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
120
	    JavaTimeModule javaTimeModule = new JavaTimeModule();
122
	    JavaTimeModule javaTimeModule = new JavaTimeModule();
121
	    objectMapper.registerModule(javaTimeModule);
123
	    objectMapper.registerModule(javaTimeModule);
122
	    return objectMapper;
124
	    return objectMapper;
123
	}
125
	}
-
 
126
	
-
 
127
 
-
 
128
	@Override
-
 
129
	public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
-
 
130
		configurer.defaultContentType(MediaType.APPLICATION_JSON_UTF8);
-
 
131
	}
124
 
132
 
125
}
133
}
126
134