4
I need to know the type of return that Spring JPA returns to put in the Service package, because it is giving a 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();
}
}
What is the complete error? At what point does Nullpointerexception?
– Dherik