Skip to content

Commit

Permalink
fix: add test to check the Unpaged class presence in the quarkus spri…
Browse files Browse the repository at this point in the history
…ng data api. fix quarkusio#8571

chore: update spring-data-api version
  • Loading branch information
aureamunoz committed Apr 16, 2020
1 parent 3965d28 commit f993240
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bom/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
<sundr.version>0.19.1</sundr.version> <!-- this is to avoid annoying pop-up in eclipse about failure to init Velocity logging -->
<flapdoodle.mongo.version>2.2.0</flapdoodle.mongo.version>
<quarkus-spring-api.version>5.2.SP1</quarkus-spring-api.version>
<quarkus-spring-data-api.version>2.1.Final</quarkus-spring-data-api.version>
<quarkus-spring-data-api.version>2.1.SP1</quarkus-spring-data-api.version>
<quarkus-spring-security-api.version>5.2.Final</quarkus-spring-security-api.version>
<quarkus-spring-boot-api.version>2.1.SP1</quarkus-spring-boot-api.version>
<mvel2.version>2.4.4.Final</mvel2.version>
Expand Down
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;
}
}
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> {

}
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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,10 @@ INSERT INTO post(id, title, bypass, posted) VALUES (3, 'Quarkus 0.20 released',
INSERT INTO post_comment(id, post_id, review) VALUES (1, 1, 'Excellent!');
INSERT INTO post_comment(id, post_id, review) VALUES (2, 1, 'Wonderful!');

INSERT INTO song(id, title, author) VALUES (1, 'Consejo de sabios' , 'Vetusta Morla');
INSERT INTO song(id, title, author) VALUES (2, 'Nothing else mothers' , 'Metallica');
INSERT INTO song(id, title, author) VALUES (3, 'Ephedra' , 'My Sleeping Karma');
INSERT INTO song(id, title, author) VALUES (4, 'Whatever it takes' , 'Imagine Dragons');
INSERT INTO song(id, title, author) VALUES (5, 'Santos que yo te pinte' , 'Los planetas');
INSERT INTO song(id, title, author) VALUES (6, 'Drinkee' , 'Sofi Tukker');

0 comments on commit f993240

Please sign in to comment.