#276 - Changed Javaslang example to use Vavr instead.

Module rename 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 90546357c7
commit ad36e7a059
5 changed files with 20 additions and 19 deletions

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>
<properties>

View File

@@ -6,16 +6,17 @@
<groupId>org.springframework.data.examples</groupId>
<artifactId>spring-data-jpa-examples</artifactId>
<version>1.0.0.BUILD-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</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
*/