- Building RESTful Web Services with Spring 5(Second Edition)
- Raja CSP Raman Ludovic Dewailly
- 97字
- 2021-06-30 19:13:30
getAllUsers – mapping
Inside the routingFunction, we will add our first endpoint for getAllUsers. At first, we will keep the null values in the handler to avoid errors in the code:
return nest (
path("/user"),
nest(
accept(MediaType.ALL),
route(GET("/"), null)
)
);
The preceding nest method will be used to route to the right function, and it will also be used to group other routers. In the preceding method, we use /user in our path and we use GET("/") method as a router. Also, we use MediaType.ALL to accept all media ranges to simplify the code.
推薦閱讀
- Web安全防護指南:基礎篇
- C++黑客編程揭秘與防范
- Web Application Development with R Using Shiny
- 互聯網安全的40個智慧洞見:2014年中國互聯網安全大會文集
- 2018網信發展報告
- Wireshark網絡分析就這么簡單
- 城市治理一網統管
- Bonita Open Solution 5.x Essentials
- 物聯網與智能家居
- jQuery Mobile Web Development Essentials
- Learning Windows 8 Game Development
- 一本書讀懂物聯網
- Python API Development Fundamentals
- RestKit for iOS
- 區塊鏈社區運營手冊