Align with API changes in latest Spring Data Kay snapshots

See gh-7461
This commit is contained in:
Andy Wilkinson
2017-03-24 11:26:27 +00:00
parent 83df8e47fe
commit a9a31107cf
6 changed files with 21 additions and 11 deletions

View File

@@ -16,6 +16,8 @@
package sample.secure.oauth2;
import java.util.Optional;
import org.springframework.data.repository.CrudRepository;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -33,7 +35,7 @@ public interface FlightRepository extends CrudRepository<Flight, Long> {
@Override
@PreAuthorize("#oauth2.hasScope('read')")
Flight findOne(Long aLong);
Optional<Flight> findOne(Long aLong);
@Override
@PreAuthorize("#oauth2.hasScope('write')")