Spring MVC Controller Exception Handling summary

Source: Internet
Author: User
Tags server error log

In the project development process, often encountered the situation of service attack, although the interface in the design process has a considerable number of security measures, such as cookie check, wind control, access to fuse and other related technologies to ensure the security of services, but it is necessary to collect analysis of these attack requestors, To provide data protection for wind-controlled big data.

Talk less, first look at the server error log: The following

Found that there are many such errors, it is felt that some people use the tool for mass attacks, and so on, is not a good person.


Looking at its stack information, I can't see what it is, like which interface? Request an address? Like, this kind of mistake has no use at all, want it to dry hair? Do you consume disk?

SPRINGMVC provides controlleradvice and exceptionhandler annotations that are very useful for handling request exception information. Exception information can be customized to make the exception information more fully understandable.


It's a lot better, it's just simple.

Spring MVC Controller Exception Handling summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.