我正在使用 grails 3 rest-api 配置文件。我创建了生成的简单域类
@Resource(readOnly = false, formats = ['json', 'xml'])
class User {
String name
String address
Date dateOfBirth
}
虽然http://localhost:8080/user/会给我返回 json 用户列表,但如果我尝试http://localhost:8080/user/1如果返回:
{"message":"Not Found","error":404}
是什么赋予了 ?