Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package pl.garciapl.test;
- import org.springframework.format.Formatter;
- import org.springframework.format.FormatterRegistrar;
- import org.springframework.format.FormatterRegistry;
- import java.util.HashSet;
- import java.util.Set;
- public class CurrencyLocaleFormatterRegistrar implements FormatterRegistrar {
- private Set<Formatter> formatters = new HashSet<>();
- public CurrencyLocaleFormatterRegistrar(Set<Formatter> formatters) {
- this.formatters = formatters;
- }
- @Override
- public void registerFormatters(FormatterRegistry registry) {
- for (Formatter element : this.formatters) {
- registry.addFormatter(element);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement