-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8620 from aureamunoz/8571-unpaged-not-found
fix: add test to check the Unpaged class presence in the quarkus spri…
- Loading branch information
Showing
5 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
integration-tests/spring-data-jpa/src/main/java/io/quarkus/it/spring/data/jpa/Song.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package io.quarkus.it.spring.data.jpa; | ||
|
||
import javax.persistence.Entity; | ||
import javax.persistence.GeneratedValue; | ||
import javax.persistence.Id; | ||
|
||
@Entity | ||
public class Song { | ||
|
||
@Id | ||
@GeneratedValue | ||
public Long id; | ||
|
||
private String title; | ||
|
||
private String author; | ||
|
||
public Long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public void setTitle(String title) { | ||
this.title = title; | ||
} | ||
|
||
public String getAuthor() { | ||
return author; | ||
} | ||
|
||
public void setAuthor(String author) { | ||
this.author = author; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...ion-tests/spring-data-jpa/src/main/java/io/quarkus/it/spring/data/jpa/SongRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.quarkus.it.spring.data.jpa; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface SongRepository extends JpaRepository<Song, Long> { | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
...ation-tests/spring-data-jpa/src/main/java/io/quarkus/it/spring/data/jpa/SongResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package io.quarkus.it.spring.data.jpa; | ||
|
||
import java.util.List; | ||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.Produces; | ||
|
||
import org.springframework.data.domain.Pageable; | ||
|
||
@Path("/song") | ||
public class SongResource { | ||
|
||
private final SongRepository songRepository; | ||
|
||
public SongResource(SongRepository songRepository) { | ||
this.songRepository = songRepository; | ||
} | ||
|
||
@GET | ||
@Produces("application/json") | ||
@Path("/all") | ||
public List<Song> all() { | ||
Pageable wholePage = Pageable.unpaged(); | ||
return songRepository.findAll(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters