Subversion Repositories SmartDukaan

Rev

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

Rev 26191 Rev 26192
Line 64... Line 64...
64
    public void addFormatters(FormatterRegistry registry) {
64
    public void addFormatters(FormatterRegistry registry) {
65
        DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
65
        DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
66
        DateTimeFormatter df = new DateTimeFormatterBuilder()
66
        DateTimeFormatter df = new DateTimeFormatterBuilder()
67
                .parseCaseInsensitive()
67
                .parseCaseInsensitive()
68
                .append(DateTimeFormatter.ISO_LOCAL_DATE)
68
                .append(DateTimeFormatter.ISO_LOCAL_DATE)
69
                .appendLiteral(' ')
69
                .optionalStart()
-
 
70
                .append(DateTimeFormatter.ofPattern("[T][ ]"))
70
                .append(DateTimeFormatter.ISO_LOCAL_TIME)
71
                .append(DateTimeFormatter.ISO_LOCAL_TIME)
71
                .toFormatter();
72
                .toFormatter();
72
        registrar.setDateTimeFormatter(df);
73
        registrar.setDateTimeFormatter(df);
73
        registrar.setDateFormatter(DateTimeFormatter.ISO_LOCAL_DATE);
74
        registrar.setDateFormatter(DateTimeFormatter.ISO_LOCAL_DATE);
74
        registrar.setTimeFormatter(DateTimeFormatter.ISO_LOCAL_TIME);
75
        registrar.setTimeFormatter(DateTimeFormatter.ISO_LOCAL_TIME);
Line 82... Line 83...
82
        converters.add(new MappingJackson2HttpMessageConverter(objectMapper()));
83
        converters.add(new MappingJackson2HttpMessageConverter(objectMapper()));
83
    }
84
    }
84
	
85
	
85
	@Bean
86
	@Bean
86
	public ObjectMapper objectMapper() {
87
	public ObjectMapper objectMapper() {
87
		DateTimeFormatter df = new DateTimeFormatterBuilder()
88
		DateTimeFormatter df = DateTimeFormatter.ofPattern(")
88
                .parseCaseInsensitive()
-
 
89
                .append(DateTimeFormatter.ISO_LOCAL_DATE)
-
 
90
                .appendLiteral(' ')
-
 
91
                .append(DateTimeFormatter.ISO_LOCAL_TIME)
-
 
92
                .toFormatter();
-
 
93
		
89
		
94
		DateTimeFormatter sf = new DateTimeFormatterBuilder()
90
		DateTimeFormatter sf = new DateTimeFormatterBuilder()
95
				.parseCaseInsensitive()
91
				.parseCaseInsensitive()
96
				.append(DateTimeFormatter.ISO_LOCAL_DATE)
92
				.append(DateTimeFormatter.ISO_LOCAL_DATE)
97
				.appendLiteral('T')
93
				.appendLiteral('T')