List of usage examples for org.springframework.web.context ConfigurableWebApplicationContext getBeansOfType
<T> Map<String, T> getBeansOfType(@Nullable Class<T> type) throws BeansException;
From source file:com.kixeye.chassis.transport.http.HttpTransportConfiguration.java
private Collection<ObjectMapper> getObjectMappers(ConfigurableWebApplicationContext webApplicationContext) { Map<String, JacksonMessageSerDe> serdes = webApplicationContext.getBeansOfType(JacksonMessageSerDe.class); if (serdes.isEmpty()) { return Collections.emptyList(); }/*www . j av a 2s.com*/ return Collections2.transform(serdes.values(), new Function<JacksonMessageSerDe, ObjectMapper>() { @Nullable @Override public ObjectMapper apply(@Nullable JacksonMessageSerDe serDe) { return serDe.getObjectMapper(); } }); }