Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
822b473c
Commit
822b473c
authored
May 04, 2017
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update samples following API changes in Spring Data snapshots
findOne is now findById
parent
11c3c4c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
SampleCouchbaseApplication.java
...ava/sample/data/couchbase/SampleCouchbaseApplication.java
+2
-2
FlightRepository.java
.../java/sample/secure/oauth2/resource/FlightRepository.java
+1
-1
FlightRepository.java
.../src/main/java/sample/secure/oauth2/FlightRepository.java
+1
-1
No files found.
spring-boot-samples/spring-boot-sample-data-couchbase/src/main/java/sample/data/couchbase/SampleCouchbaseApplication.java
View file @
822b473c
/*
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
7
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -37,7 +37,7 @@ public class SampleCouchbaseApplication implements CommandLineRunner {
...
@@ -37,7 +37,7 @@ public class SampleCouchbaseApplication implements CommandLineRunner {
public
void
run
(
String
...
args
)
throws
Exception
{
public
void
run
(
String
...
args
)
throws
Exception
{
this
.
userRepository
.
deleteAll
();
this
.
userRepository
.
deleteAll
();
User
user
=
saveUser
();
User
user
=
saveUser
();
System
.
out
.
println
(
this
.
userRepository
.
find
One
(
user
.
getId
()));
System
.
out
.
println
(
this
.
userRepository
.
find
ById
(
user
.
getId
()));
}
}
private
User
saveUser
()
{
private
User
saveUser
()
{
...
...
spring-boot-samples/spring-boot-sample-secure-oauth2-resource/src/main/java/sample/secure/oauth2/resource/FlightRepository.java
View file @
822b473c
...
@@ -32,7 +32,7 @@ public interface FlightRepository extends CrudRepository<Flight, Long> {
...
@@ -32,7 +32,7 @@ public interface FlightRepository extends CrudRepository<Flight, Long> {
Iterable
<
Flight
>
findAll
();
Iterable
<
Flight
>
findAll
();
@Override
@Override
Optional
<
Flight
>
find
One
(
Long
aLong
);
Optional
<
Flight
>
find
ById
(
Long
aLong
);
@Override
@Override
<
S
extends
Flight
>
S
save
(
S
entity
);
<
S
extends
Flight
>
S
save
(
S
entity
);
...
...
spring-boot-samples/spring-boot-sample-secure-oauth2/src/main/java/sample/secure/oauth2/FlightRepository.java
View file @
822b473c
...
@@ -35,7 +35,7 @@ public interface FlightRepository extends CrudRepository<Flight, Long> {
...
@@ -35,7 +35,7 @@ public interface FlightRepository extends CrudRepository<Flight, Long> {
@Override
@Override
@PreAuthorize
(
"#oauth2.hasScope('read')"
)
@PreAuthorize
(
"#oauth2.hasScope('read')"
)
Optional
<
Flight
>
find
One
(
Long
aLong
);
Optional
<
Flight
>
find
ById
(
Long
aLong
);
@Override
@Override
@PreAuthorize
(
"#oauth2.hasScope('write')"
)
@PreAuthorize
(
"#oauth2.hasScope('write')"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment