mirror of
https://github.com/OtusTeam/Spring.git
synced 2026-05-30 10:50:42 +00:00
A bit of Fix
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ public class Main {
|
||||
Disposable flux = repository.findAll()
|
||||
.subscribe(p -> System.out.println(p.getName()));
|
||||
|
||||
Thread.sleep(5000);
|
||||
Thread.sleep(20000);
|
||||
|
||||
flux.dispose();
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,13 +1,14 @@
|
||||
package ru.otus.spring.repostory;
|
||||
|
||||
import org.springframework.data.mongodb.repository.Query;
|
||||
import org.springframework.data.mongodb.repository.ReactiveMongoRepository;
|
||||
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
import ru.otus.spring.domain.Person;
|
||||
|
||||
|
||||
public interface PersonRepository extends ReactiveCrudRepository<Person, String> {
|
||||
public interface PersonRepository extends ReactiveMongoRepository<Person, String> {
|
||||
|
||||
Flux<Person> findByName(String name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user