this issue is not bug or any thing, just make me a little mixed. I just think that someone may be like me, so I submit the issue.
Question code: https://github.com/spring-projects/spring-security/blob/main/itest/web/src/main/java/org/springframework/security/itest/web/TestController.java
TestController is already annotated with @RestController, all return value will be as ResponseBody.
but TestController#secure annotated with @ResponseBody.
Context
effect: It makes me a little mixed. I try to find a piece of code where need the @ResponseBody, but can't find any thing about @ResponseBody in the integration testing of web.
trying to accomplish: remove the @ResponseBody of TestController#secure.
Comment From: sjohnr
Thanks for getting in touch @liruohrh, but it feels like this is a question that would be better suited to Stack Overflow. We prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add a minimal sample that reproduces this issue if you feel this is a genuine bug.
As a side note, I am sadly having a bit of trouble understanding you, but I think you're saying that you are confused by the @ResponseBody annotation on the method in TestController. If so, it may help to know that the integration test you refer to is over 8 years old, and things may have changed since then. Even if they have not, I will agree with your assessment that @ResponseBody is not needed and can be removed.
I'm going to close this issue but let me know if I have misunderstood anything.