Subversion Repositories SmartDukaan

Rev

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

Rev 23890 Rev 23924
Line 5... Line 5...
5
import org.springframework.beans.factory.annotation.Autowired;
5
import org.springframework.beans.factory.annotation.Autowired;
6
import org.springframework.context.annotation.ComponentScan;
6
import org.springframework.context.annotation.ComponentScan;
7
import org.springframework.context.annotation.Configuration;
7
import org.springframework.context.annotation.Configuration;
8
import org.springframework.format.FormatterRegistry;
8
import org.springframework.format.FormatterRegistry;
9
import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar;
9
import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar;
-
 
10
import org.springframework.http.converter.ByteArrayHttpMessageConverter;
10
import org.springframework.http.converter.HttpMessageConverter;
11
import org.springframework.http.converter.HttpMessageConverter;
11
import org.springframework.http.converter.ResourceHttpMessageConverter;
12
import org.springframework.http.converter.ResourceHttpMessageConverter;
12
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
13
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
13
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
14
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
14
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
15
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
Line 60... Line 61...
60
	@Override
61
	@Override
61
    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
62
    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
62
 
63
 
63
        converters.add(new MappingJackson2HttpMessageConverter(objectMapper()));
64
        converters.add(new MappingJackson2HttpMessageConverter(objectMapper()));
64
        converters.add(new ResourceHttpMessageConverter());	
65
        converters.add(new ResourceHttpMessageConverter());	
-
 
66
        converters.add(new ByteArrayHttpMessageConverter());	
65
        super.configureMessageConverters(converters);
67
        super.configureMessageConverters(converters);
66
    }
68
    }
67
	
69
	
68
	private ObjectMapper objectMapper() {
70
	private ObjectMapper objectMapper() {
69
		ObjectMapper mapper = new ObjectMapper()
71
		ObjectMapper mapper = new ObjectMapper()