Subversion Repositories SmartDukaan

Rev

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

Rev 23924 Rev 23925
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;
-
 
11
import org.springframework.http.converter.HttpMessageConverter;
10
import org.springframework.http.converter.HttpMessageConverter;
12
import org.springframework.http.converter.ResourceHttpMessageConverter;
11
import org.springframework.http.converter.ResourceHttpMessageConverter;
13
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
12
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
14
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
13
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
15
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
14
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
Line 57... Line 56...
57
    }
56
    }
58
 
57
 
59
	
58
	
60
	
59
	
61
	@Override
60
	@Override
62
    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
61
    public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
63
 
-
 
64
        converters.add(new MappingJackson2HttpMessageConverter(objectMapper()));
62
        converters.add(new MappingJackson2HttpMessageConverter(objectMapper()));
65
        converters.add(new ResourceHttpMessageConverter());	
-
 
66
        converters.add(new ByteArrayHttpMessageConverter());	
-
 
67
        super.configureMessageConverters(converters);
-
 
68
    }
63
    }
69
	
64
	
70
	private ObjectMapper objectMapper() {
65
	private ObjectMapper objectMapper() {
71
		ObjectMapper mapper = new ObjectMapper()
66
		ObjectMapper mapper = new ObjectMapper()
72
				   .registerModule(new ParameterNamesModule())
67
				   .registerModule(new ParameterNamesModule())