Skip to content

Commit ad36e7a

Browse files
committed
spring-projects#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.
1 parent 9054635 commit ad36e7a

File tree

5 files changed

+20
-19
lines changed

5 files changed

+20
-19
lines changed

jpa/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
<module>showcase</module>
2222
<module>interceptors</module>
2323
<module>java8</module>
24-
<module>javaslang</module>
2524
<module>jpa21</module>
2625
<module>security</module>
2726
<module>multiple-datasources</module>
2827
<module>eclipselink</module>
2928
<module>query-by-example</module>
29+
<module>vavr</module>
3030
</modules>
3131

3232
<properties>

jpa/javaslang/pom.xml renamed to jpa/vavr/pom.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@
66
<groupId>org.springframework.data.examples</groupId>
77
<artifactId>spring-data-jpa-examples</artifactId>
88
<version>1.0.0.BUILD-SNAPSHOT</version>
9+
<relativePath>../pom.xml</relativePath>
910
</parent>
1011

11-
<artifactId>spring-data-jpa-javaslang</artifactId>
12-
<name>Spring Data JPA - Javaslang integration</name>
12+
<artifactId>spring-data-jpa-vavr</artifactId>
13+
<name>Spring Data JPA - Vavr integration</name>
1314

1415
<dependencies>
1516
<dependency>
16-
<groupId>io.javaslang</groupId>
17-
<artifactId>javaslang</artifactId>
18-
<version>2.0.5</version>
17+
<groupId>io.vavr</groupId>
18+
<artifactId>vavr</artifactId>
19+
<version>0.9.1</version>
1920
</dependency>
2021
</dependencies>
2122

jpa/javaslang/src/main/java/example/PersonRepository.java renamed to jpa/vavr/src/main/java/example/PersonRepository.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 the original author or authors.
2+
* Copyright 2016-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,19 +15,19 @@
1515
*/
1616
package example;
1717

18-
import javaslang.collection.Map;
19-
import javaslang.collection.Seq;
20-
import javaslang.collection.Set;
21-
import javaslang.control.Option;
18+
import io.vavr.collection.Map;
19+
import io.vavr.collection.Seq;
20+
import io.vavr.collection.Set;
21+
import io.vavr.control.Option;
2222

2323
import java.util.List;
2424
import java.util.Optional;
2525

2626
import org.springframework.data.repository.Repository;
2727

2828
/**
29-
* Repository interface showing the usage of Javaslang collections and its {@link Option} type as repository query
30-
* method return types.
29+
* Repository interface showing the usage of Vavr collections and its {@link Option} type as repository query method
30+
* return types.
3131
*
3232
* @author Oliver Gierke
3333
*/
@@ -44,8 +44,8 @@ public interface PersonRepository extends Repository<Person, Long> {
4444
Option<Person> findById(Long id);
4545

4646
/**
47-
* {@link Seq} can be used as alternative to JDK's {@link List}. Javaslang's {@link Set} and {@link Map} are
48-
* supported, too, and transparently mapped from their JDK counterparts.
47+
* {@link Seq} can be used as alternative to JDK's {@link List}. Vavr's {@link Set} and {@link Map} are supported,
48+
* too, and transparently mapped from their JDK counterparts.
4949
*
5050
* @param firstname
5151
* @return

jpa/javaslang/src/test/java/example/PersonRepositoryIntegrationTests.java renamed to jpa/vavr/src/test/java/example/PersonRepositoryIntegrationTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 the original author or authors.
2+
* Copyright 2016-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,8 +17,8 @@
1717

1818
import static org.assertj.core.api.Assertions.*;
1919

20-
import javaslang.collection.Seq;
21-
import javaslang.control.Option;
20+
import io.vavr.collection.Seq;
21+
import io.vavr.control.Option;
2222

2323
import org.junit.Test;
2424
import org.junit.runner.RunWith;
@@ -29,7 +29,7 @@
2929
import org.springframework.transaction.annotation.Transactional;
3030

3131
/**
32-
* Integration tests for {@link PersonRepository} showing Javaslang support at repsoitory query methods.
32+
* Integration tests for {@link PersonRepository} showing Vavr support at repository query methods.
3333
*
3434
* @author Oliver Gierke
3535
*/

0 commit comments

Comments
 (0)