Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何使用Spring Boot检测和禁止IP地址发出过多请求?_Java_Spring_Spring Boot_Ip Address_Apprequests - Fatal编程技术网

Java 如何使用Spring Boot检测和禁止IP地址发出过多请求?

Java 如何使用Spring Boot检测和禁止IP地址发出过多请求?,java,spring,spring-boot,ip-address,apprequests,Java,Spring,Spring Boot,Ip Address,Apprequests,有人知道如何在很短的时间内自动检测和禁止大量请求的IP地址吗 示例:有人制作了一个脚本,在索引页上执行不同的特殊字符,试图减慢或关闭网站: https://website.com?name=23343jvugij https://website.com?name=%ç*3233 https://website.com?name=SELECT_*"ç221 https://website.com?name=23+*+~33¬¬ https://website.com?name=&&

有人知道如何在很短的时间内自动检测和禁止大量请求的IP地址吗

示例:有人制作了一个脚本,在索引页上执行不同的特殊字符,试图减慢或关闭网站:

https://website.com?name=23343jvugij
https://website.com?name=%ç*3233
https://website.com?name=SELECT_*"ç221
https://website.com?name=23+*+~33¬¬
https://website.com?name=&&%*ç"exit
https://website.com?name=count(*)#@|@
用户一直在执行它,比如说每分钟100个请求。
有没有一种方法可以检测到这一点并在Spring Boot中立即禁止用户的IP地址?

有很多方法可以做到这一点,但我建议使用


它有一个基于远程IP地址限制速率的选项。

您尝试过吗?如果是,你能提供代码吗?你可以找到一些教程,自己试试。如果你有任何问题,社区会帮助你。