Merge branch '2.0.x' into 2.1.x

Closes gh-17078
This commit is contained in:
Andy Wilkinson
2019-06-07 10:50:34 +01:00
2691 changed files with 27746 additions and 46049 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

@@ -55,8 +55,7 @@ public class SampleJpaApplicationTests {
@Test
public 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));
}
}