This commit is contained in:
trang
2018-03-14 11:05:58 +08:00
parent 6e4a1a9314
commit c23226ec80
2 changed files with 4 additions and 2 deletions
@@ -16,7 +16,8 @@ public class JpaTests extends BaseTest {
@Test
public void testOne() {
cityRepository.findById(1L)
.ifPresent(gson::toJson);
.map(gson::toJson)
.ifPresent(city -> log.info("{}", city));
}
@Test
@@ -17,7 +17,8 @@ public class MyBatisTests extends BaseTest {
@Test
public void testOne() {
Optional.ofNullable(cityMapper.findById(1L))
.ifPresent(gson::toJson);
.map(gson::toJson)
.ifPresent(city -> log.info("{}", city));
}
@Test