如题:
halo版本:2.13
定义api:
@Component
@AllArgsConstructor
public class TodoListRouterFactory {
/**
* @return a {@link RouterFunction} instance
*/
@Bean
RouterFunction<ServerResponse> todoListRouter() {
RouterFunction<ServerResponse> route = route()
.GET("/hello-world", accept(MediaType.TEXT_PLAIN),
request -> ServerResponse.ok().bodyValue("Hello World")).build();
return route;
}
}
以上定义的api不起作用。
用以下方式就ok
@ApiVersion("fake.halo.run/v1alpha1")
@RequestMapping("/apples")
@RestController
public class AppleController {
@PostMapping("/starting")
public void starting() {
}
}
哪位高手指点一下?特别感谢!