i69699
2016-12-27 13:03
采纳率: 50%
浏览 991
已采纳

java小菜鸟求助(防尘符)

java中的“::”什么意思
比如:
RouterFunction<?> route = route(GET("/person/{id}"),
request -> {
Mono person = Mono.justOrEmpty(request.pathVariable("id"))
.map(Integer::valueOf)
.then(repository::getPerson);
return Response.ok().body(fromPublisher(person, Person.class));
})
.and(route(GET("/person"),
request -> {
Flux people = repository.allPeople();
return Response.ok().body(fromPublisher(people, Person.class));
}))
.and(route(POST("/person"),
request -> {
Mono person = request.body(toMono(Person.class));
return Response.ok().build(repository.savePerson(person));
}));

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

相关推荐 更多相似问题