Subversion Repositories SmartDukaan

Rev

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

Rev 26192 Rev 26193
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
                .optionalStart()
69
                .appendLiteral('T')
70
                .append(DateTimeFormatter.ofPattern("[T][ ]"))
-
 
71
                .append(DateTimeFormatter.ISO_LOCAL_TIME)
70
                .append(DateTimeFormatter.ISO_LOCAL_TIME)
72
                .toFormatter();
71
                .toFormatter();
73
        registrar.setDateTimeFormatter(df);
72
        registrar.setDateTimeFormatter(df);
74
        registrar.setDateFormatter(DateTimeFormatter.ISO_LOCAL_DATE);
73
        registrar.setDateFormatter(DateTimeFormatter.ISO_LOCAL_DATE);
75
        registrar.setTimeFormatter(DateTimeFormatter.ISO_LOCAL_TIME);
74
        registrar.setTimeFormatter(DateTimeFormatter.ISO_LOCAL_TIME);
Line 83... Line 82...
83
        converters.add(new MappingJackson2HttpMessageConverter(objectMapper()));
82
        converters.add(new MappingJackson2HttpMessageConverter(objectMapper()));
84
    }
83
    }
85
	
84
	
86
	@Bean
85
	@Bean
87
	public ObjectMapper objectMapper() {
86
	public ObjectMapper objectMapper() {
88
		DateTimeFormatter df = DateTimeFormatter.ofPattern(")
87
		DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd[[T][ ]]HH:mm:ss");
89
		
88
		
90
		DateTimeFormatter sf = new DateTimeFormatterBuilder()
89
		DateTimeFormatter sf = new DateTimeFormatterBuilder()
91
				.parseCaseInsensitive()
90
				.parseCaseInsensitive()
92
				.append(DateTimeFormatter.ISO_LOCAL_DATE)
91
				.append(DateTimeFormatter.ISO_LOCAL_DATE)
93
				.appendLiteral('T')
92
				.appendLiteral('T')