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.
Removed explicit generation of DefaultDataAccessStrategy since that is now done by default.
Using MyBatisDataAccessStrategy factory for creating an appropriate DataAccessStrategy in the presence of MyBatis.
Removed references to DefaultNamingStrategy since that is now merged into NamingStrategy.
Extracted MyBatis Boot Starter version int property in pom.xml. Removed unused code, more use of Lombok, formatting. Added new lines at end of files where missing.
Original pull request: #345.
MyBatisTests demonstrates how some queries executed by Spring Data JDBC can be replaced with MyBatis mappings.
The domain model is based on the basic JDBC.
The map of models is maintained by two statements configured in MyBatis mappings.
example.springdata.jdbc.mybatis.LegoSetMapper.findAllByProperty-models showcases how a map can be loaded by configuring the select to return instances of Map.Entry
example.springdata.jdbc.mybatis.Model.insert showcases how one can access the MyBatixContext and thereby the instance to save and the key of the parent entity.
Original pull request: #345.
Tweaking indentation in pom.xml to use tabs. Switch to upgrade to Spring Data release train Lovelace to simplify dependency declarations.
Import order. Copyright years. Formatting.
Original pull request: #324.
Make sure test that previously used @SpringBootApplication now use @SpringBootTest to properly initialize Boot's default logging configuration.
Added explicit logback.xml to make sure tests running without Boot don't use debug logging by default.
Exclude SecurityAutoConfiguration via application.properties as class was moved across packages. Add lombok.config to add @ConstructorProperties to Redis JSON objects.
We now use StepVerifier and RxJava's .test() methods instead of .block() calls. Using blocking methods is an anti pattern which should be avoided within tests. Test API comes with timeouts and protects tests from never completing.
Replace flatMap(…) operator after collection drop with then(…) to create the collection regardless of whether the previous operation emitted an element or not.
Collect emitted elements to add an assertion and fail if the tailing does not work.
Tweak bom to reflect Spring Framework and Spring Data versions.
Remove reactive Couchbase configuration code required prior to Spring Boot 2.0 M7.
Tweak CORS examples to adapt to Spring Framework's disabled allowCredentials by default.
Add license headers. Replace CouchbaseConfiguration with Spring Boot properties. Post-process example data to make it accessible for repository use. Fix Id type. Add examples for N1ql and view access.
Enable couchbase examples in parent pom.
Add test rule to skip tests if Couchbase is not available.
Original pull request: #275.
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.
Tweaked setup of in-memory user accounts in Spring Security example to accommodate the changes in Password encoding.
Tweaked Elasticsearch examples to use Log4j 2 instead of Logback as embedded Elasticsearch requires it to run properly.
Removed Spring Framework 5 build profile as Boot 2.0 is based on that already. Removed obsolete custom property to use Spring Data Kay. Removed explicit declaration of the compiler plugin as Boot defaults to Java 8 and compiling with -parameters now.
Removed fixed versions of dependencies. Removed explicit declaration of Lettuce version as it is now managed by Boot. Switched to Lettuce as primary Redis driver in application setup. We keep using Jedis in the embedded server support.