Can't use findOne() in my code with JpaRepository:
Use findById().get() instead of findOne()
yourRespository.findById(id).get();// it will return an Optional instead of null
yourRespository.findById(id).orElse(null); // this will return null if you have proper null checksThere have been some changes with the recent versions of spring data JPA and they have removed the
findOne() the method which used work earlier.