Merge branch '2.1.x'

Closes gh-17079
This commit is contained in:
Andy Wilkinson
2019-06-07 11:00:44 +01:00
2799 changed files with 28402 additions and 47836 deletions

View File

@@ -28,8 +28,7 @@ import javax.persistence.SequenceGenerator;
public class Note {
@Id
@SequenceGenerator(name = "note_generator", sequenceName = "note_sequence",
initialValue = 5)
@SequenceGenerator(name = "note_generator", sequenceName = "note_sequence", initialValue = 5)
@GeneratedValue(generator = "note_generator")
private long id;

View File

@@ -28,8 +28,7 @@ import javax.persistence.SequenceGenerator;
public class Tag {
@Id
@SequenceGenerator(name = "tag_generator", sequenceName = "tag_sequence",
initialValue = 4)
@SequenceGenerator(name = "tag_generator", sequenceName = "tag_sequence", initialValue = 4)
@GeneratedValue(generator = "tag_generator")
private long id;

View File

@@ -33,8 +33,7 @@ class JpaNoteRepository implements NoteRepository {
@Override
public List<Note> findAll() {
return this.entityManager.createQuery("SELECT n FROM Note n", Note.class)
.getResultList();
return this.entityManager.createQuery("SELECT n FROM Note n", Note.class).getResultList();
}
}

View File

@@ -33,8 +33,7 @@ class JpaTagRepository implements TagRepository {
@Override
public List<Tag> findAll() {
return this.entityManager.createQuery("SELECT t FROM Tag t", Tag.class)
.getResultList();
return this.entityManager.createQuery("SELECT t FROM Tag t", Tag.class).getResultList();
}
}

View File

@@ -52,8 +52,7 @@ class SampleJpaApplicationTests {
@Test
void testHome() throws Exception {
this.mvc.perform(get("/")).andExpect(status().isOk())
.andExpect(xpath("//tbody/tr").nodeCount(4));
this.mvc.perform(get("/")).andExpect(status().isOk()).andExpect(xpath("//tbody/tr").nodeCount(4));
}
}