我正在爲某些社交網絡後端設計使用Spring引導的API。我目前的模型是這樣的: public class User {
private long id;
private String handle;
private String name;
private List<User> followers;
private List<User> fol
我有3個型號/資源: Model A Model B Model C屬於Model A和Model B 然後,我可以建立我的API的路線是這樣的: /api/a-resources/x/c-resources /api/b-resources/x/c-resources 或者,也許我可以這樣做: /api/c-resources?a_resource_id=x /api/c-resources?b