File tree Expand file tree Collapse file tree
src/main/java/com/gabriel_torelo/game_list/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import java .util .List ;
44import org .springframework .beans .factory .annotation .Autowired ;
55import org .springframework .stereotype .Service ;
6+ import org .springframework .transaction .annotation .Transactional ;
7+ import com .gabriel_torelo .game_list .dto .GameLongDTO ;
68import com .gabriel_torelo .game_list .dto .GameMinDTO ;
9+ import com .gabriel_torelo .game_list .dto .GameShortDTO ;
710import com .gabriel_torelo .game_list .entities .Game ;
811import com .gabriel_torelo .game_list .repositories .GameRepository ;
912
@@ -13,6 +16,7 @@ public class GameService {
1316 @ Autowired
1417 private GameRepository gameRepository ;
1518
19+ @ Transactional (readOnly = true )
1620 public List <GameMinDTO > readAll () {
1721 List <Game > rGames = gameRepository .findAll ();
1822
You can’t perform that action at this time.
0 commit comments