Made a day, finally 11 o ‘clock more than solved, record once. SerializationException: Cannot SerializationException: Cannot SerializationException: Cannot SerializationException: Cannot SerializationException: Cannot SerializationException: Cannot SerializationException: Cannot SerializationException: Cannot SerializationException:
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.data.redis.serializer.SerializationException: Cannot serialize; nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to serialize object using DefaultSerializer; nested exception is java.io.NotSerializableException: com.wanghaixin.springboot.model.Student] with root cause
Solution:
NotSerializable is not serialized objects, object Article cannot be serialized therefore appeared this problem.
JavaBeans to cache must implement the Serializable interface, because Spring serializes objects before storing them in Redis
For this exception, just modify the corresponding JavaBean object, mine is Student
public class Student implements Serializable
Read More:
- Request cannot get static resource
- Possible causes and solutions of 404 problems in accessing servlet pages
- (20200916 Solved)Docker||redis-cli Could not connect to Redis at 127.0.0.1:6379: Connection refused
- Exception of browser accessing servlet404
- Spring boot project running error: Servlet.service () for servlet [dispatcherServlet] threw exception
- No such file or directory error when redis is started under Windows
- Solution to error 1452: cannot add or update a child row: a foreign key constraint failures in MySQL
- How to Fix stack overflow error
- stay web.xml Configure error page in
- [Qt] error: call to non-static member function without an object argument
- Solution of redisconnection factory in springboot2 not Autowired
- [spring] start error: nosuchmethoderror: javax.servlet.http . HttpServletResponse.getStatus () I
- HTTP status 500 – internal server error (resolved) for Tomcat running project
- JWT and token + redis scheme of spring security
- Solution of idea using @ Autowired annotation to report errors
- XmlSerialize error: There was an error generating the XML document.
- MySQL error: column ‘ID’ in field list is ambiguous
- Springboot integration redis reports non null key required (solved)
- Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request p
- Mybatis uses step-by-step lazy loading to cause abnormal JSON conversion. The interface 500 reports an error