Recently I used the hsets function of spring-data-redis in the project, but encountered an error
org.springframework.data.redis.RedisSystemException: Unknown redis exception; nested exception is java.lang.NullPointerException
It was found through testing that when the value of a key in the map object is null, a secondary exception is thrown. As long as it is changed to an empty string "", the exception will not be thrown.
In normal use, this situation should be avoided. If it is null, then the key-value pair will lose its meaning.