I am facing a issue.. I have a many to many relationship with jpa in spring boot, but I need to expose the following product has many tags and tag has many product
if query product/1
{product:{name:"product 1"}, tags:[ tag1:{name:"tag 1"}, tag2:{name:"tag2"} ] }
if query tag/1
{tag:1, products:[ product1:[{name:"product 1"}, tag2:{product:"tag2"} ] }
what is the way to expose this with rest with spring boot? a example, url or and idea it would be useful.