Spring Data repository method return type errors
Reports Spring Data CRUD repository methods with incorrect return types.
The following return types are supported:
void
Primitive types
Wrapper types
T
when the query method is expected to return one result at most. Returnsnull
if there are no results and throwsIncorrectResultSizeDataAccessException
if there is more than one result.java.util.List
or any commonIterable
typejava.util.stream.Stream
java.util.Optional
orscala.Option
when the query method is expected to return one result at most. ReturnsOptional.empty()
orOptional.absent()
if there are no results and throwsIncorrectResultSizeDataAccessException
if there is more than one result.io.micronaut.data.model.Page
io.micronaut.data.model.Slice
java.util.concurrent.Future
,java.util.concurrent.CompletableFuture
, orListenableFuture
if the method is annotated with@Async
and Spring asynchronous method execution is enabledGeoResults<T>
,GeoResult<T>
, orGeoPage<T>
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Spring Data, 233.SNAPSHOT |