I need to know the type of return that Spring JPA returns to put in the Service package, because it is giving NullPointerException
:
Dao:
public interface PlaylistDao extends JpaRepository<Playlist, Long> {
@Query("select count(*) from Playlist")
public int verifica();
}
Service:
@Service
@Transactional
public class PlaylistServiceImpl implements PlaylistService {
@Autowired
private PlaylistDao dao;
public int verifica(){
return dao.verifica();
}
}