I want to return the value of playlists
records in the database, but that code did not work.
public interface PlaylistDao extends JpaRepository<Playlist, Long> {
@Query("select count(*) from Playlist")
public int verifica();
}
@Service
@Transactional
public class PlaylistServiceImpl implements PlaylistService {
@Autowired
private PlaylistDao dao;
public int verifica(){
return dao.verifica();
}
}