diff --git a/jpa/vavr/src/main/java/example/PersonRepository.java b/jpa/vavr/src/main/java/example/PersonRepository.java index f49f32dc..547e841d 100644 --- a/jpa/vavr/src/main/java/example/PersonRepository.java +++ b/jpa/vavr/src/main/java/example/PersonRepository.java @@ -25,6 +25,7 @@ import java.util.List; import java.util.Optional; import org.springframework.data.repository.Repository; +import org.springframework.data.repository.query.Param; /** * Repository interface showing the usage of Vavr collections and its {@link Option} type as repository query method @@ -51,7 +52,7 @@ public interface PersonRepository extends Repository { * @param firstname * @return */ - Seq findByFirstnameContaining(String firstname); + Seq findByFirstnameContaining(@Param("firstname") String firstname); /** * Returning a {@link Try} is supported out of the box with all exceptions being handled by {@link Try} immediately. @@ -59,5 +60,5 @@ public interface PersonRepository extends Repository { * @param lastname * @return */ - Try> findByLastnameContaining(String lastname); + Try> findByLastnameContaining(@Param("lastname") String lastname); }