Spring data jpa map result set to non-entity pojo and convert to jackson

We use spring jpa data, and we have our own request in one of the repos. We want to match the result of this query with the pojo non-entity. Everything works fine, but the return result is a list of objects, not a nonjo class.

After selecting this pojo list, we want to convert it to a json response. Which works great for other api, but not when we use classes without entities.

Has anyone done something like this?

+5
source share

Source: https://habr.com/ru/post/1240111/


All Articles