Here are some steps that can be taken to fix the RestController's debug point in the Spring Boot Test:
Make sure that the RestController is scanned and registered in the Spring Boot Application. Check if the controller is included in the @ComponentScan or @SpringBootApplication annotations.
Check if the @RequestMapping annotation of the RestController is correctly mapped. The URL should match with the value specified in the annotation.
Ensure that the test class is annotated with @SpringBootTest and @AutoConfigureMockMvc. This will start the Spring context and enable the MockMvc instance for testing.
Verify if the request URL in the test case matches with the RestController's request mapping URL. Use the MockMvc instance to send the request to the endpoint.
Check if any exceptions are thrown in the RestController code. If there are any errors or exceptions, it may not hit the debug point. Fixing the error can resolve the issue.
If the RestController is still not hitting the debug point, enable the debug logs for Spring Boot. You can add logging.level.org.springframework=DEBUG in the application.properties file. This will provide detailed logs and help to troubleshoot the issue.
If all the above steps fail, try using a different IDE or trying to debug in command-line mode. Sometimes, IDEs may not work well with Spring Boot Test debugging.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-12-10 11:00:00 +0000
Seen: 12 times
Last updated: Dec 11 '21
What is the method to adjust Unity point light --> near plane to a value smaller than 0.1?
At what point the conditions for Jquery If, else if, else statements are not being executed?
At what point should is_nothrow_constructible be utilized?
How to calculate the location of the sub-solar point?
At what point in time are the call operators for lambda functions created?
What is a basic function that allows the creation of new points with specific attributes?
What is an incompatible pointer to a function?
What does it mean to zoom in to a specific point on a one-dimensional scale?