In my @Repository interface I created custom find method with JPQL @Query that contains parameter (addressType).
from Address a where a.addressType = :addressT
Answer from JB Nizet and Xtreme Biker are both corrects. I just want to add that if you use Spring Boot the -parameters compiler flag is already added for you by spring-boot-starter-parent (Gradle or Maven) :
plugin {
delegate.groupId('org.apache.maven.plugins')
delegate.artifactId('maven-compiler-plugin')
configuration {
delegate.parameters('true')
}
}