我不知道发生了什么但突然我的Nodemon开始显示错误.
nikhil@nikhil-Lenovo-Z50-70:~/Desktop/dominos$ nodemon server.js
[nodemon] 1.12.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node server.js`
[nodemon] Internal watch failed: watch /home/nikhil/Desktop/dominos
ENOSPC
Run Code Online (Sandbox Code Playgroud)
即便如此,我的程序运行正常.但是,当我关闭此project1并在同一端口上运行另一个project2时,会发生此错误
Error: listen EADDRINUSE :::3000
at Object.exports._errnoException (util.js:1024:11)
at exports._exceptionWithHostPort (util.js:1047:20)
at Server.setupListenHandle [as _listen2] (net.js:1319:14)
at listenInCluster (net.js:1367:12)
at Server.listen (net.js:1467:7)
at Object.<anonymous> (/home/nikhil/Desktop/dominos/server.js:533:8)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3
Run Code Online (Sandbox Code Playgroud)
然后我的旧project1将保持打开状态,直到我手动终止进程才能启动新的project2.
知道为什么会这样吗?
我仍然是Java Reactive Programming的新手,我的项目需求要求我在Java中实现Pactive with Reactive Programming.
就像我点击一个在流中返回10000条记录的API一样,我需要返回一个具有适当分页的通量.
有谁能建议我这方面的好方法?
像这样是我遵循的方法.
知识库
public interface CouchBaseRepository extends ReactiveCouchBaseRepository<Book,Integer> {
@Query("#{#n1ql.selectEntity} where name=$1")
public Flux<Book> getPaginatedFlux(String name ,final Pageable pageable);
Run Code Online (Sandbox Code Playgroud)
这是我的Repositorty,但当我启动我的应用程序时,它显示以下错误.
java.lang.IllegalStateException: Method has to have one of the following return types! [interface org.springframework.data.domain.Page, interface org.springframework.data.domain.Slice, interface java.util.List]
Run Code Online (Sandbox Code Playgroud)
我不能在这里使用Page inteface,因为它是阻塞所以有什么方法可以解决这个问题吗?