I was using the Grails documentation to create a JSON endpoint out of one my domain classes. I'm perplexed because it works locally, but when deployed to my production environment (AWS Elastic Beanstalk), hitting the endpoint results in a 404. Here is how I defined the endpoint using the @Resource annotation:
@Resource(uri='/fbusers', formats=['json'])
class FacebookUser {
Long uid
String accessToken
Date accessTokenExpires
// Added fields
String username
String profilePictureUrl
static belongsTo = [user: User]
static constraints = {
uid unique: true
}
}
Works locally: http://localhost:8080/myapp/fbusers
Returns 404 in prod: mydomain.org/fbusers
Has anyone seen anything like this?
Aucun commentaire:
Enregistrer un commentaire