List of usage examples for org.springframework.core.serializer.support SerializingConverter SerializingConverter
public SerializingConverter()
From source file:io.pivotal.cla.service.github.MylynGitHubApiITests.java
@Test
@EnqueueRequests({ "getContributingUrls302", "getContributingUrls200", "getContributingUrls404",
"getContributingUrls404", "getContributingUrls302", "getContributingUrls200",
"getContributingUrls404" })
public void getContributingUrls() {
// make sure we use GitHubHost and not the GitHubApiHost
oauthConfig.setGitHubApiHost("donotuse");
oauthConfig.setGitHubHost(server.getServer().getHostName());
service = new MylynGitHubApi(oauthConfig);
List<String> repositoryIds = Arrays.asList("spring-projects/has-md", "spring-projects/has-adoc",
"spring-projects/no-contributor");
ContributingUrlsResponse urls = service.getContributingUrls(repositoryIds);
assertThat(urls.getAsciidoc()).containsExactly(
server.getServerUrl() + "/spring-projects/has-adoc/edit/master/CONTRIBUTING.adoc",
server.getServerUrl() + "/spring-projects/no-contributor/new/master?filename=CONTRIBUTING.adoc");
assertThat(urls.getMarkdown())//from w w w.j av a 2 s . c o m
.containsOnly(server.getServerUrl() + "/spring-projects/has-md/edit/master/CONTRIBUTING.md");
SerializingConverter converter = new SerializingConverter();
// ensure we can serialize the result as it is placed in FlashMap
assertThat(converter.convert(urls.getMarkdown())).isNotNull();
assertThat(converter.convert(urls.getAsciidoc())).isNotNull();
}
From source file:org.springframework.integration.jdbc.JdbcMessageStore.java
/** * Convenient constructor for configuration use. *//*w ww .ja v a 2s. c o m*/ public JdbcMessageStore() { deserializer = new DeserializingConverter(); serializer = new SerializingConverter(); }
From source file:org.springframework.integration.jdbc.store.JdbcChannelMessageStore.java
/** * Convenient constructor for configuration use. */// w w w . j a va 2s .co m public JdbcChannelMessageStore() { deserializer = new DeserializingConverter(); serializer = new SerializingConverter(); }
From source file:org.springframework.integration.jdbc.store.JdbcMessageStore.java
/** * Create a {@link MessageStore} with all mandatory properties. * @param jdbcOperations a {@link JdbcOperations} * @since 4.3.9/*from ww w . j av a 2 s .co m*/ */ public JdbcMessageStore(JdbcOperations jdbcOperations) { Assert.notNull(jdbcOperations, "'dataSource' must not be null"); this.jdbcTemplate = jdbcOperations; this.deserializer = new DeserializingConverter(); this.serializer = new SerializingConverter(); }
From source file:org.springframework.session.jdbc.JdbcOperationsSessionRepository.java
private static GenericConversionService createDefaultConversionService() { GenericConversionService converter = new GenericConversionService(); converter.addConverter(Object.class, byte[].class, new SerializingConverter()); converter.addConverter(byte[].class, Object.class, new DeserializingConverter()); return converter; }