79190755

Date: 2024-11-14 23:58:31
Score: 2
Natty:
Report link

I'm using Spring MVC with Thymeleaf also. Mine is a combo of a couple of answers that considers both cases. Changing return to void probably works; i was doing that in another method, but if you need to return a String because you need to return a name of a view/web page to go to next, it is now working for me if I return null; at the end of the method.

So staying with return of String:
I can do: return "redirect:/login"; if needed
before I write to outStream.
but if I do write to outStream, which works, I get an error,
I cannot return a string, even "" after that
but if I return null; after writing to outputStream that works.
spring boot 3.3

Reasons:
  • Blacklisted phrase (0.5): I cannot
  • RegEx Blacklisted phrase (1): I get an error
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Stan Towianski