Sometimes, e.g. for analytics, it is handy to be able to return a different entity result type from a Repository query method than the base Repository entity type or an interface based projection.
This demonstrates how to use a custom @SqlResultSetMapping in combination with @ColumnResult introduced in JPA 2.1.
Previously, the deprecated hibernate-entitymanager dependency was excluded but that was not taking effect, since current spring-boot-starter-data-jpa depends on hibernate-core.
Exclude CassandraDataAutoConfiguration because the referenced Spring Data Cassandra version is not compatible with CassandraDataAutoConfiguration. Refactor bulk loading to flapMap(…) as CassandraTemplate.insert(…) no longer accepts an entity stream.
Upgraded to Boot 1.5.6. Updated dependencies of reactive projects to latest versions to make sure the APIs of Boot work with the changes in Spring Data Kay RC1. Upgraded all other dependencies to match and got both the Redis and the Cassandra examples to compile again.
Disabled Cassandra reactive samples for now as they fail at runtime.
We now calculate the equals(…) and hashCode() methods by looking at the indentifier only. Removed default constructor in favor of Lombok's @NoArgConstructor.
Rename the Redis cluster-sentinel project to sentinel and leave a hint in the cluster-sentinel directory that points to the Redis Cluster and Redis Sentinel examples mentioning clarifying the cluster-sentinel naming.
Port handling for embedded MongoDB use has changed. Spring Boot no longer writes the port to MongoProperties but updates property sources to provide local.mongo.port so the reactive configuration is required to read local.mongo.port to obtain the port.
Embedded MongoDB auto-configuration randomizes its port. Configuration happens during the creation of embeddedMongoServer so our MongoClient creation must be delayed until then.
We now check whether an external Apache Cassandra instance is available at localhost:9042 and use it to run the examples. Otherwise, if no external Apache Cassandra instance is available, we start an embedded Cassandra instance.
Upgrade to Spring Boot 1.5 snapshots due to minor API changes in Spring Data REST so that recompilation is requited and only 1.5 picks up Ingalls. Upgraded to Querydsl 4.1.4, Spring Framework 5 build profile to 5.0 M3.
Switched to @SpringBootTest in Spring Data Redis samples as the previously deprecated @SpringApplicationConfiguation has been removed in 1.5.