Java code audit - legacy debug debugging code main () method to debug

    Debugging code may be established some unexpected entry points in a web application deployment, such as: main () method , after the on-line system, the application can be considered as the back door entrance.

    Advice:

            Be sure to remove the debugging code before deploying the application version of the product. Whether or not there is a direct security threat, once the end of the early stages of development, there is no reason such a code will remain in the application.

We need to understand the reasons:

            Java Basics:

          main () method Java debugging code:

                    When using java spring framework to write web project, every time when they could start a lot of trouble to debug their code on the page, so many programmers to debug using the main method, so save time and convenient.

           Spring is the framework used to do unit testing of two ways: https: //blog.csdn.net/bruce128/article/details/9792283 

                  First, the use of the spring in the integration Junit frame, simple and efficient

                  Second, the manual loading of the spring profile, and start spring container (main Method)
           


 

Guess you like

Origin www.cnblogs.com/jayus/p/11422925.html
Recommended