I am trying out examples for Spring Data REST however the JSON object returned in my testing does not return the column names (which were earlier 'PUT') and just returns the links to the objects. What could be wrong?
Scenario:
Entity: 'User'
@Entity
@Data
public class User {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
private String guid;
private String fullName;
private String email;
}
Repository: UserRepository (Exposed as REST service)
@RepositoryRestResource(collectionResourceRel = "users", path = "users")
public interface UserRepository extends JpaRepository<User, Long> {
}
REST 'PUT' request to create a USER object:
REST GET Call to get the JSON response for the User object (the problem)
No id, Guid or email is returned in the JSON response.