Spring Framework DateTimeFormatterRegistrar - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework DateTimeFormatterRegistrar class.

This code example shows how to use the following methods:registerFormatters
	 */ 
	public static void addDefaultFormatters(FormatterRegistry formatterRegistry) {
		formatterRegistry.addFormatterForFieldAnnotation(new NumberFormatAnnotationFormatterFactory());
		if (jsr310Present) {
			// just handling JSR-310 specific date and time types 
			new DateTimeFormatterRegistrar().registerFormatters(formatterRegistry);
		} 
		if (jodaTimePresent) {
			// handles Joda-specific types as well as Date, Calendar, Long 
			new JodaTimeFormatterRegistrar().registerFormatters(formatterRegistry);
		} 
		else { 
			// regular DateFormat-based Date, Calendar, Long converters 
			new DateFormatterRegistrar().registerFormatters(formatterRegistry);
		} 
	} 
 
} 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Spring Framework DateTimeFormatterRegistrar Methods: