'Unknown method requests crashing Spring App

I have a Spring App deployed on an EC2 instance. It frequently crashes, and when I check the logs there are several unknown and illegible method names that have thrown IllegalArgumentExceptions.

I showed a similar request error to someone in security and they told me: "attempt to dos with http requests then inject mozi.m to slave the net to a botnet."

Would Spring Security be the answer to block external requests to the app?
Spring boot error log



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source