Ok, I think upto some extent I've found the answer for my questions:
Regarding
java.lang.IllegalStateException
I was missing following Listner in my web.xml:<listener> <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class> </listener>
- SDR and Spring HATEOAS both are two different dancers, where SDR dancing with HATEOAS but HATEOAS can do a solo dance. SDR basically expose our Spring Data powered repository as REST service which can be used as self exploring machine as per our repository design and its extended other repository such as
GraphRepository
orPagingAndSortingRepository
etc. As far as I can get, Spring HATEOAS is Link building machine which use our REST service or Controller class to build links to given resource. for e.g.
Entity obj = repository.findByName(name); Resource<Entity> resource = new Resource<Entity>(obj); resource.add(JaxRsLinkBuilder.linkTo(TestResource.class).withRel("entity")); return resource;
I think this is the only way to manually create links and relationship for every required entity beans, in case of SDR this was automatically controlled.
For validation or security, I found this link useful. but still trying to implement it.
I hope this helps to someone.. if possible please feel free to update or correct my answer. Thanks