【发布时间】:2019-09-03 12:14:14
【问题描述】:
基本上,我使用 Spring Boot 在服务器端托管一个数据库。我想从客户端编写自定义查询,该查询是用角度开发的,并从服务器端调用一个函数来给我所需的结果。
服务器端的函数如下所示:
List<rows> func(String customQuery){
//fetch rows from table using this custom query and return those rows
//which I can use in client side.
}
Below are examples of customQuery which I need to send from client side:
select * from table;
select * from table where id>10;
select * from table where id>20 and id<30;
到目前为止,我在互联网上搜索我找不到任何解决方案。请帮忙。
【问题讨论】:
-
这看起来像是一个巨大的安全漏洞。如何检索自定义查询?网络服务?
标签: java angular spring-boot spring-data-jpa jpa-2.1