Mercurial > hg > SpringPlayground
comparison spring-boot-playground/src/main/java/de/comline/spring/service/MovieService.java @ 6:d57d0c6a841b
Einbau von liquibase zum Erzeugen des Schemas
author | Dirk Olmes <dirk.olmes@codedo.de> |
---|---|
date | Thu, 13 Aug 2020 16:18:20 +0200 |
parents | 92d52e4ac567 |
children | 4594ff529ab1 |
comparison
equal
deleted
inserted
replaced
5:227f3105fedd | 6:d57d0c6a841b |
---|---|
17 public Movie createMovie(String title) { | 17 public Movie createMovie(String title) { |
18 Movie movie = new Movie(title); | 18 Movie movie = new Movie(title); |
19 movie = repository.save(movie); | 19 movie = repository.save(movie); |
20 return movie; | 20 return movie; |
21 } | 21 } |
22 | |
23 @Transactional | |
24 public String listAllMovies() { | |
25 StringBuilder buf = new StringBuilder(128); | |
26 repository.findAll().forEach(movie -> buf.append(movie.getTitle()).append(",")); | |
27 return buf.toString(); | |
28 } | |
22 } | 29 } |