comparison spring-boot-playground/src/main/java/de/comline/spring/service/MovieService.java @ 14:4594ff529ab1

Noch ein Test ganz ohne Spring hinzugefuegt.
author Dirk Olmes <dirk.olmes@codedo.de>
date Mon, 17 Aug 2020 14:39:26 +0200
parents d57d0c6a841b
children
comparison
equal deleted inserted replaced
13:a633d0623278 14:4594ff529ab1
9 import de.comline.spring.repository.MovieRepository; 9 import de.comline.spring.repository.MovieRepository;
10 10
11 @Service 11 @Service
12 public class MovieService { 12 public class MovieService {
13 @Autowired 13 @Autowired
14 private MovieRepository repository; 14 protected MovieRepository repository;
15 15
16 @Transactional 16 @Transactional
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);