Subversion Repositories SmartDukaan

Rev

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

Rev 26188 Rev 26189
Line 62... Line 62...
62
    public void addFormatters(FormatterRegistry registry) {
62
    public void addFormatters(FormatterRegistry registry) {
63
        DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
63
        DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
64
        DateTimeFormatter df = new DateTimeFormatterBuilder()
64
        DateTimeFormatter df = new DateTimeFormatterBuilder()
65
                .parseCaseInsensitive()
65
                .parseCaseInsensitive()
66
                .append(DateTimeFormatter.ISO_LOCAL_DATE)
66
                .append(DateTimeFormatter.ISO_LOCAL_DATE)
67
                .optionalStart()
-
 
68
                .appendLiteral('T')
-
 
69
                .optionalEnd()
-
 
70
                .optionalStart()
-
 
71
                .appendLiteral(' ')
67
                .appendLiteral(' ')
72
                .optionalEnd()
-
 
73
                .append(DateTimeFormatter.ISO_LOCAL_TIME)
68
                .append(DateTimeFormatter.ISO_LOCAL_TIME)
74
                .toFormatter();
69
                .toFormatter();
75
        registrar.setDateTimeFormatter(df);
70
        registrar.setDateTimeFormatter(df);
76
        registrar.setDateFormatter(DateTimeFormatter.ISO_LOCAL_DATE);
71
        registrar.setDateFormatter(DateTimeFormatter.ISO_LOCAL_DATE);
77
        registrar.setTimeFormatter(DateTimeFormatter.ISO_LOCAL_TIME);
72
        registrar.setTimeFormatter(DateTimeFormatter.ISO_LOCAL_TIME);
Line 81... Line 76...
81
	
76
	
82
	
77
	
83
	@Override
78
	@Override
84
    public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
79
    public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
85
        converters.add(new MappingJackson2HttpMessageConverter(objectMapper()));
80
        converters.add(new MappingJackson2HttpMessageConverter(objectMapper()));
-
 
81
        coverters.add
86
    }
82
    }
87
	
83
	
88
	@Bean
84
	@Bean
89
	public ObjectMapper objectMapper() {
85
	public ObjectMapper objectMapper() {
90
		DateTimeFormatter df = new DateTimeFormatterBuilder()
86
		DateTimeFormatter df = new DateTimeFormatterBuilder()