spring-attic / tut-react-and-spring-data-rest

React.js and Spring Data REST :: A tutorial based on the 5-part blog series by Greg Turnquist
https://spring.io/guides/tutorials/react-and-spring-data-rest
882 stars 1.58k forks source link

Test rest #42

Closed DiegoECQ closed 7 years ago

DiegoECQ commented 7 years ago

Hello, i can't see results for this rest: http://localhost:8080/api/employees

image

Thank's

Regards.

gregturn commented 7 years ago

Screen shot looks like it's showing the collection just fine. What do you think is missing?

DiegoECQ commented 7 years ago

According to the guide should see the data of the employee.

image image

Thanks Regards.

gregturn commented 7 years ago

Okay, here's what I did:

  1. Checkout latest copy of tutorial.
  2. cd into basic
  3. run mvn clean spring-boot:run
  4. go into separate shell and execute curl:
$ curl localhost:8080/api/employees
{
  "_embedded" : {
    "employees" : [ {
      "firstName" : "Frodo",
      "lastName" : "Baggins",
      "description" : "ring bearer",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/employees/1"
        },
        "employee" : {
          "href" : "http://localhost:8080/api/employees/1"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/employees"
    },
    "profile" : {
      "href" : "http://localhost:8080/api/profile/employees"
    }
  }
}

Looks good to me. What have you done differently, and have you edited any of the code?

aprakash-sovrn commented 7 years ago

I'm seeing the exact same issue. Was there ever any resolution to this?

gregturn commented 7 years ago

We have a difference in reproduceability. Try wiping your maven cache at .m2 and running the steps I posted.

aprakash-sovrn commented 7 years ago

This ended up being a user-error on my part. Missed the @Data annotation on the @Entity, so wasn't getting the getters/setters. Sorry about that.

On Sun, Mar 26, 2017 at 5:11 AM, Greg Turnquist notifications@github.com wrote:

We have a difference in reproduceability. Try wiping your maven cache at .m2 and running the steps I posted.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/spring-guides/tut-react-and-spring-data-rest/issues/42#issuecomment-289273260, or mute the thread https://github.com/notifications/unsubscribe-auth/AVRFPPmlaKiIYw2Xy6UJtYJ_mfkkfYgEks5rpkfpgaJpZM4MERwj .

gregturn commented 7 years ago

np