I am using Spring 5 in my project. Until today there was available method CrudRepository#findOne.
But after downloading latest snapshot it suddenly disappeared! Is t
Note that findById is not an exact replacement for findOne, it returns an Optional instead of null.
findById
findOne
Optional
null
Being not very familiar with new java things it took me a little while to figure out, but this turns the findById behavior into the findOne one:
return rep.findById(id).orElse(null);