标签: spring-boot api rest restful-url
在我的Spring Boot应用程序中,每个用户将具有许多加入的课程。我为与课程相关的API定义了一个用<{1}注释的控制器 CourseController 。 现在,我想定义一个API路径,以获取 CourseController 中所有当前登录用户的课程。目前,我想出了@RestController("/courses"),因此,路径为 / courses / me / all 。但这似乎不正确,因为课程下的我没有意义 您对定义路径有更好的主意吗?
@RestController("/courses")