minor fix to generated @see jdoc annotation in @Find method

Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
Gavin King 2024-10-25 00:50:59 +02:00
parent 7bf6004ef8
commit d25a86b12d
2 changed files with 3 additions and 2 deletions

View File

@ -12,6 +12,7 @@ import jakarta.data.repository.Repository;
import jakarta.transaction.Transactional; import jakarta.transaction.Transactional;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.util.List; import java.util.List;
@ -19,7 +20,7 @@ import java.util.List;
public interface Bookshop extends CrudRepository<Book,String> { public interface Bookshop extends CrudRepository<Book,String> {
@Find @Find
@Transactional @Transactional
List<Book> byPublisher(String publisher_name); List<Book> byPublisher(@Size(min=2,max=100) String publisher_name);
@Find @Find
List<Book> byTitle(@Nonnull String title); List<Book> byTitle(@Nonnull String title);

View File

@ -109,7 +109,7 @@ public abstract class AbstractQueryMethod extends AbstractAnnotatedMethod {
String type = fullType; String type = fullType;
// strip off type annotations // strip off type annotations
while ( type.charAt(0) == '@' ) { while ( type.charAt(0) == '@' ) {
int startIndex = type.indexOf( ' ' ); int startIndex = type.lastIndexOf( ' ' );
if ( startIndex > 0 ) { if ( startIndex > 0 ) {
type = type.substring(startIndex+1); type = type.substring(startIndex+1);
} }