#276 - Changed Javaslang example to use Vavr instead.

Module renamed and switched to Vavr packages. Explicitly refer to the Kay snapshots as the Vavr support is not available in a Spring Data release yet.
This commit is contained in:
Oliver Gierke
2017-05-11 13:11:43 +02:00
parent 567da544b7
commit 562b95996b
6 changed files with 19 additions and 20 deletions

View File

@@ -12,7 +12,6 @@ We have separate folders for the samples of individual modules:
* `example` - Probably the project you want to have a look at first. Contains a variety of sample packages, showcasing the different levels at which you can use Spring Data JPA. Have a look at the `simple` package for the most basic setup.
* `interceptors` - Example of how to enrich the repositories with AOP.
* `java8` - Example of how to use Spring Data JPA auditing with Java 8 date time types as well as the usage of `Optional` as return type for repository methods. Note, this project requires to be build with JDK 8.
* `javaslang` - Shows the support of Javaslang collection types as return types for query methods (deprecated, see the Vavr module).
* `jpa21` - Shows support for JPA 2.1 specific features (stored procedures support).
* `multiple-datasources` - Examples of how to use Spring Data JPA with multiple `DataSource`s.
* `query-by-example` - Example project showing usage of Query by Example with Spring Data JPA.

View File

@@ -21,12 +21,12 @@
<module>showcase</module>
<module>interceptors</module>
<module>java8</module>
<module>javaslang</module>
<module>jpa21</module>
<module>security</module>
<module>multiple-datasources</module>
<module>eclipselink</module>
<module>query-by-example</module>
<module>vavr</module>
</modules>
<dependencies>

View File

@@ -8,14 +8,14 @@
<version>2.0.0.BUILD-SNAPSHOT</version>
</parent>
<artifactId>spring-data-jpa-javaslang</artifactId>
<name>Spring Data JPA - Javaslang integration</name>
<artifactId>spring-data-jpa-vavr</artifactId>
<name>Spring Data JPA - Vavr integration</name>
<dependencies>
<dependency>
<groupId>io.javaslang</groupId>
<artifactId>javaslang</artifactId>
<version>2.0.5</version>
<groupId>io.vavr</groupId>
<artifactId>vavr</artifactId>
<version>0.9.1</version>
</dependency>
</dependencies>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,10 +15,10 @@
*/
package example;
import javaslang.collection.Map;
import javaslang.collection.Seq;
import javaslang.collection.Set;
import javaslang.control.Option;
import io.vavr.collection.Map;
import io.vavr.collection.Seq;
import io.vavr.collection.Set;
import io.vavr.control.Option;
import java.util.List;
import java.util.Optional;
@@ -26,8 +26,8 @@ import java.util.Optional;
import org.springframework.data.repository.Repository;
/**
* Repository interface showing the usage of Javaslang collections and its {@link Option} type as repository query
* method return types.
* Repository interface showing the usage of Vavr collections and its {@link Option} type as repository query method
* return types.
*
* @author Oliver Gierke
*/
@@ -44,8 +44,8 @@ public interface PersonRepository extends Repository<Person, Long> {
Option<Person> findById(Long id);
/**
* {@link Seq} can be used as alternative to JDK's {@link List}. Javaslang's {@link Set} and {@link Map} are
* supported, too, and transparently mapped from their JDK counterparts.
* {@link Seq} can be used as alternative to JDK's {@link List}. Vavr's {@link Set} and {@link Map} are supported,
* too, and transparently mapped from their JDK counterparts.
*
* @param firstname
* @return

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,8 +17,8 @@ package example;
import static org.assertj.core.api.Assertions.*;
import javaslang.collection.Seq;
import javaslang.control.Option;
import io.vavr.collection.Seq;
import io.vavr.control.Option;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -29,7 +29,7 @@ import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.transaction.annotation.Transactional;
/**
* Integration tests for {@link PersonRepository} showing Javaslang support at repsoitory query methods.
* Integration tests for {@link PersonRepository} showing Vavr support at repository query methods.
*
* @author Oliver Gierke
*/