From 5abe34754877764d38e749755655d121e3f7c1bc Mon Sep 17 00:00:00 2001 From: "Michael J. Simons" Date: Tue, 31 May 2016 14:46:50 +0200 Subject: [PATCH] DATAJPA-908 - Added note about named parameters and @Param. Clarifies that the use of @Param is optional when on Java 8 and compiling with -parameters flag. Original pull request: #173. --- src/main/asciidoc/jpa.adoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/asciidoc/jpa.adoc b/src/main/asciidoc/jpa.adoc index 45068c1ec..f63c83b93 100644 --- a/src/main/asciidoc/jpa.adoc +++ b/src/main/asciidoc/jpa.adoc @@ -322,6 +322,11 @@ public interface UserRepository extends JpaRepository { ==== Note that the method parameters are switched according to the occurrence in the query defined. +[NOTE] +==== +Spring 4 fully supports Java 8’s parameter name discovery based on the `-parameters` compiler flag. Using this flag in your build as an alternative to debug information, you can omit the `@Param` annotation for named parameters. +==== + [[jpa.query.spel-expressions]] === Using SpEL expressions