feiyu02
2024-09-10 6c7f45871b93ef26d353a5a3596701ac2f39ed9c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//package cn.flightfeather.supervision.lightshare.web
//
//import cn.flightfeather.supervision.domain.ds1.entity.TaskVo
//import cn.flightfeather.supervision.lightshare.repository.TaskRepository
//import org.springframework.context.annotation.Bean
//import org.springframework.context.annotation.Configuration
//import org.springframework.web.reactive.function.server.ServerResponse
//import org.springframework.web.reactive.function.server.bodyToMono
//import org.springframework.web.reactive.function.server.router
//import reactor.core.publisher.toMono
//
////@Configuration
//class TaskConfiguration(val taskRepository: TaskRepository) {
////    @Bean
////    fun routesTask() = router {
////        GET("/tasks", { ServerResponse.ok().body(taskRepository.findAll(), TaskVo::class.java) })
//////        POST("/tasks", { ServerResponse.ok().body("hello world".toMono(), String::class.java) })
////        GET("/tasks/{id}", { ServerResponse.ok().body(taskRepository.findOne(it.pathVariable("id")), TaskVo::class.java) })
////        PUT("/tasks", { ServerResponse.ok().body(taskRepository.save(it.bodyToMono(TaskVo::class.java)), Int::class.java)})
////        PUT("/test", { ServerResponse.ok().body(taskRepository.test(it),Int::class.java)})
////    }
//}