Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.IllegalStateException: No primary or single unique constructor found for interface javax.servlet.http.HttpServletRequest] with root cause
用SpringBoot做验证码的时候,需要用HttpServletRequest保存一些验证码的信息,但是访问验证码的页面就会有空白页,找了很多答案都不行,注解都正常。
我突然灵机一动,降低了SpringBoot parent版本,我用的是3.0.3,降到2.7.8
成功!