@ConfigurationPropertiesBinding @Bean public Converter<String, List<Class<? extends Throwable>>> commaSeparatedStringToThrowablesCollection() { return new Converter<String, List<Class<? extends Throwable>>>() { @Override public List<Class<? extends Throwable>> convert(final String source) { try { final List<Class<? extends Throwable>> classes = new ArrayList<>(); for (final String className : StringUtils.commaDelimitedListToStringArray(source)) { classes.add((Class<? extends Throwable>) ClassUtils.forName(className.trim(), getClass().getClassLoader())); } return classes; } catch (final Exception e) { throw new IllegalStateException(e); } } }; }
@Bean @ConfigurationPropertiesBinding public Converter<String, Foo> converter() { return new Converter<String, ConverterBindingTests.Foo>() { @Override public Foo convert(String source) { return new Foo(source); } }; }
@Bean @ConfigurationPropertiesBinding public Converter<String, Foo> converter() { return new Converter<String, ConverterBindingTests.Foo>() { @Override public Foo convert(String source) { Foo foo = new Foo(); foo.setName(source); return foo; } }; }
@Bean @ConfigurationPropertiesBinding public StringOrNumberToMigrationVersionConverter stringOrNumberMigrationVersionConverter() { return new StringOrNumberToMigrationVersionConverter(); }
@Bean @ConfigurationPropertiesBinding public ConstraintConverter constraintConverter() { return new ConstraintConverter(); }
@Bean @ConfigurationPropertiesBinding public Converter<String, InetSocketAddress> inetSocketAddressConverter() { return new InetSocketAddressConverter(); }
@Bean @ConfigurationPropertiesBinding public DurationConverter durationConverter() { return new DurationConverter(); }
@Bean @ConfigurationPropertiesBinding public ShorthandMapConverter shorthandMapConverter() { return new ShorthandMapConverter(); }
@Bean @ConfigurationPropertiesBinding public SignatureAlgorithmConverter signatureAlgorithmConverter() { return new SignatureAlgorithmConverter(); }
@Bean @ConfigurationPropertiesBinding @IntegrationConverter public Converter<String, Expression> spelConverter() { return new SpelConverter(); }
@Bean @ConfigurationPropertiesBinding public StringToDurationConverter stringToDurationConverter() { return new StringToDurationConverter(); }
@Bean @ConfigurationPropertiesBinding public StringToHostAndPortConverter stringToHostAndPortConverter() { return new StringToHostAndPortConverter(); }
@Bean @ConfigurationPropertiesBinding public StringToTimeValueConverter stringToDurationConverter() { return new StringToTimeValueConverter(); }