mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-07 17:59:02 +00:00
Align with API changes in latest Spring Data Kay snapshots
See gh-7461
This commit is contained in:
+3
-1
@@ -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')")
|
||||
|
||||
Reference in New Issue
Block a user