Questions about the use of redis in spring

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.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326360861&siteId=291194637