title: how to implement a spring boot controller to return the result of a query as json
body: <p>I am trying to a write a spring boot controller which can return the result of a native query as json. I will be passing the query as input parameter and the return must be result of the query. Is there a way to do this? I know the http rpc help on this. The query can be anything and the system must accept it and must respond with the result as json.</p>
  
  <p>For example if I pass the request as <code>select * from employee</code> it must respond with result of query as json.</p>