Spring Boot Learning Sharing (5) - Web Application Debugging Using IntelliJ IDEA


Debugging spring boot programs using IntelliJ IDEA


After the test RESTful Web Service project is started, the plug-in that comes with IntelliJ IDEA is used
write picture description here
, and the plug-in simulates the web request to achieve the purpose of testing without the front end. Since the server response can be obtained and the information such as cookies can be saved in a single test, it can be It is very convenient to test the authorization verification framework similar to shiro


The plugin's panel:
write picture description here

important point:

1. Do not make mistakes in the methods of GET and POST
. 2. The cookies are the same only under the same test. Otherwise, you must manually add
them. (If you want to transmit JSON data, you can use the text
in the RequestBody panel to edit the JSON data, and then send it) 4. If you encounter the content of the returned Response , if you use shiro's permission verification, then please check whether you add that link It is set to allow access. Another situation is that your control layer throws an exception , resulting in no return of any results. 5. When using this plug-in, you can click the blue text in the above picture to generate an http file for testing. The effect is as follows: use this plug-in The file will have convenient functions such as recording history, but the blogger found that cookies cannot be shared when testing. . . .
<Response body is empty>


write picture description here


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325485033&siteId=291194637
Recommended