Tag Archives: cache

[Solved] SpringBoot+Dubbo Startup Error: Fail to start server(url dubbo192.168.0.920880service

When using springboot + Dubbo, the startup project reports an error

All error information is as follows:

org.apache.dubbo.rpc.RpcException: Fail to start server(url: dubbo://192.168.0.9:20880/service.UserInfoService?anyhost=true&application=user-login-service&bind.ip=192.168.0.9&bind.port=20880&channel.readonly.sent=true&codec=dubbo&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&heartbeat=60000&interface=service.UserInfoService&metadata-type=remote&methods=selectUesers,deleteUser,registerUser,updateUser,selectUser,findAllUsers&pid=83072&qos.accept.foreign.ip=false&qos.enable=false&release=2.7.8&side=provider&timestamp=1641785798014) Failed to bind NettyServer on /192.168.0.9:20880, cause: Address already in use: bind
	at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:348) ~[dubbo-2.7.8.jar:2.7.8]
	at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.openServer(DubboProtocol.java:320) ~[dubbo-2.7.8.jar:2.7.8]
	at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.export(DubboProtocol.java:303) ~[dubbo-2.7.8.jar:2.7.8]
	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:64) ~[dubbo-rpc-api-2.7.8.jar:2.7.8]
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:155) ~[dubbo-rpc-api-2.7.8.jar:2.7.8]
	at org.apache.dubbo.qos.protocol.QosProtocolWrapper.export(QosProtocolWrapper.java:66) ~[dubbo-2.7.8.jar:2.7.8]
	at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java) ~[dubbo-common-2.7.8.jar:2.7.8]
	at org.apache.dubbo.registry.integration.RegistryProtocol.lambda$doLocalExport$2(RegistryProtocol.java:255) ~[dubbo-registry-api-2.7.8.jar:2.7.8]
	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) ~[na:1.8.0_302]
	at org.apache.dubbo.registry.integration.RegistryProtocol.doLocalExport(RegistryProtocol.java:253) ~[dubbo-registry-api-2.7.8.jar:2.7.8]
	at org.apache.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:205) ~[dubbo-registry-api-2.7.8.jar:2.7.8]
	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:62) ~[dubbo-rpc-api-2.7.8.jar:2.7.8]
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:153) ~[dubbo-rpc-api-2.7.8.jar:2.7.8]
	at org.apache.dubbo.qos.protocol.QosProtocolWrapper.export(QosProtocolWrapper.java:64) ~[dubbo-2.7.8.jar:2.7.8]
	at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java) ~[dubbo-common-2.7.8.jar:2.7.8]
	at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:492) ~[dubbo-2.7.8.jar:2.7.8]
	at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:325) ~[dubbo-2.7.8.jar:2.7.8]
	at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:300) ~[dubbo-2.7.8.jar:2.7.8]
	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:206) ~[dubbo-2.7.8.jar:2.7.8]
	at org.apache.dubbo.config.bootstrap.DubboBootstrap.lambda$exportServices$15(DubboBootstrap.java:1103) ~[dubbo-2.7.8.jar:2.7.8]
	at java.util.HashMap$Values.forEach(HashMap.java:981) ~[na:1.8.0_302]
	at org.apache.dubbo.config.bootstrap.DubboBootstrap.exportServices(DubboBootstrap.java:1090) ~[dubbo-2.7.8.jar:2.7.8]
	at org.apache.dubbo.config.bootstrap.DubboBootstrap.start(DubboBootstrap.java:901) ~[dubbo-2.7.8.jar:2.7.8]
	at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onContextRefreshedEvent(DubboBootstrapApplicationListener.java:59) ~[dubbo-2.7.8.jar:2.7.8]
	at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationContextEvent(DubboBootstrapApplicationListener.java:52) ~[dubbo-2.7.8.jar:2.7.8]
	at org.apache.dubbo.config.spring.context.OneTimeExecutionApplicationContextEventListener.onApplicationEvent(OneTimeExecutionApplicationContextEventListener.java:40) ~[dubbo-2.7.8.jar:2.7.8]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176) ~[spring-context-5.3.14.jar:5.3.14]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169) ~[spring-context-5.3.14.jar:5.3.14]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) ~[spring-context-5.3.14.jar:5.3.14]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421) ~[spring-context-5.3.14.jar:5.3.14]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378) ~[spring-context-5.3.14.jar:5.3.14]
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:938) ~[spring-context-5.3.14.jar:5.3.14]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) ~[spring-context-5.3.14.jar:5.3.14]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.2.jar:2.6.2]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) [spring-boot-2.6.2.jar:2.6.2]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:412) [spring-boot-2.6.2.jar:2.6.2]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) [spring-boot-2.6.2.jar:2.6.2]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) [spring-boot-2.6.2.jar:2.6.2]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1290) [spring-boot-2.6.2.jar:2.6.2]
	at com.clc.userlogin7000.demo.UserLoginApplication.main(UserLoginApplication.java:12) [classes/:na]
Caused by: org.apache.dubbo.remoting.RemotingException: Failed to bind NettyServer on /192.168.0.9:20880, cause: Address already in use: bind
	at org.apache.dubbo.remoting.transport.AbstractServer.<init>(AbstractServer.java:77) ~[dubbo-remoting-api-2.7.8.jar:2.7.8]
	at org.apache.dubbo.remoting.transport.netty4.NettyServer.<init>(NettyServer.java:77) ~[dubbo-2.7.8.jar:2.7.8]
	at org.apache.dubbo.remoting.transport.netty4.NettyTransporter.bind(NettyTransporter.java:35) ~[dubbo-2.7.8.jar:2.7.8]
	at org.apache.dubbo.remoting.Transporter$Adaptive.bind(Transporter$Adaptive.java) ~[dubbo-common-2.7.8.jar:2.7.8]
	at org.apache.dubbo.remoting.Transporters.bind(Transporters.java:56) ~[dubbo-remoting-api-2.7.8.jar:2.7.8]
	at org.apache.dubbo.remoting.exchange.support.header.HeaderExchanger.bind(HeaderExchanger.java:44) ~[dubbo-remoting-api-2.7.8.jar:2.7.8]
	at org.apache.dubbo.remoting.exchange.Exchangers.bind(Exchangers.java:70) ~[dubbo-remoting-api-2.7.8.jar:2.7.8]
	at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:346) ~[dubbo-2.7.8.jar:2.7.8]
	... 39 common frames omitted
Caused by: java.net.BindException: Address already in use: bind
	at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_302]
	at sun.nio.ch.Net.bind(Net.java:463) ~[na:1.8.0_302]
	at sun.nio.ch.Net.bind(Net.java:455) ~[na:1.8.0_302]
	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:233) ~[na:1.8.0_302]
	at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:134) ~[netty-transport-4.1.72.Final.jar:4.1.72.Final]
	at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:562) ~[netty-transport-4.1.72.Final.jar:4.1.72.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334) ~[netty-transport-4.1.72.Final.jar:4.1.72.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:506) ~[netty-transport-4.1.72.Final.jar:4.1.72.Final]
	at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:491) ~[netty-transport-4.1.72.Final.jar:4.1.72.Final]
	at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973) ~[netty-transport-4.1.72.Final.jar:4.1.72.Final]
	at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:260) ~[netty-transport-4.1.72.Final.jar:4.1.72.Final]
	at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356) ~[netty-transport-4.1.72.Final.jar:4.1.72.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) ~[netty-common-4.1.72.Final.jar:4.1.72.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469) ~[netty-common-4.1.72.Final.jar:4.1.72.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503) ~[netty-transport-4.1.72.Final.jar:4.1.72.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) ~[netty-common-4.1.72.Final.jar:4.1.72.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.72.Final.jar:4.1.72.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.72.Final.jar:4.1.72.Final]
	at java.lang.Thread.run(Thread.java:853) ~[na:1.8.0_302]

Solution:

application.yaml or application.properties configuration file port from 20880 to 20881 can be modified because I have configured 20880 in other modules, so here again configuration will report a duplicate binding exception ~ ~

[Solved] SpringBoot Integrate ES Error: Elasticsearch health check failed

Recently, when a springboot integrated es project was started, an error was reported after successful startup: Elasticsearch health check failed

There are two method to solve this error:

1. Close the health check of the actor on elasticsearch (I tried this method, and the project cannot be started later, and this method is not recommended):

management:
  health:
    elasticsearch:
      enabled: false

2. Configure according to spring.elasticsearch.rest. uris (the problem is solved after restart):

spring:
  # ES search engine
  data:
    elasticsearch:
      cluster-nodes: 47.103.5.190:9300
      cluster-name: docker-cluster
      repositories:
        enabled: true
  elasticsearch:
    rest:
      uris: ["http://47.103.5.190:9200"]

Redis: DENIED Redis is running in protected mode [How to Solve]

As shown below, the program reports an error when connecting to redis. According to the error information, redis is running in protected mode. It needs to be set under the redis command line: config set protected-mode no.

-DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions:

Just disable protected mode sending the command ‘CONFIG SET protected-mode no’ from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent.

Alternatively you can just disable the protected mode by editing the Redis configuration file, and setting the protected mode option to ‘no’, and then restarting the server.

If you started the server manually just for testing, restart it with the ‘–protected-mode no’ option.

Setup a bind address or an authentication password.

NOTE: You only need to do one of the above things in order for the server to start accepting connections from the outside.

Error message when using pycharm to connect to redis:

Detect redis port 6379 through telnet command

Solution:

Set protected-mode no

Check the redis port 6379 through the telnet command again, and there is no access exception.

Run Python again to connect to redis:

Supplementary knowledge:

When you use telnet (telnet IP port number) to connect to the host under Linux/Unix, you will be prompted “escape character is’ ^] ‘. What does this mean? How to solve it?

Escape character is ‘^]’. Solution

“^” means the Ctrl key!

1. This prompt means that pressing Ctrl +] will call out the command line of Telnet!

2. After the telnet command line comes out, you can execute the telnet command;

3. Exit the telnet command line with the name quit.

Common telnet commands

close closes the current connection

logout forces the remote user to exit and close the connection

display displays the parameters of the current operation

mode attempted to enter command line mode or character mode

open connect to a site

quit exit

telnetsend send special characters

set sets the parameters of the current operation

unset resets the current operating parameters

status print status information

toggle switch operation parameters

slc changes the state of special characters

Auth on/off confirmation function Z suspended

Telnetenviron changes the environment variable and displays help

To sum up, escape character is’ ^] ‘. It is just a prompt that you can call the command line of Telnet using Ctrl +] key.

[Solved] Springboot Project Startup Error: Unable to Identify bootstrap.yml Configuration

Question

The springboot project I built myself reports an error when I start the project, but I can’t find the relevant configuration information. It is clearly configured in bootstrap.yml , and the application.yml I have been using before. Thinking that the priority of application.yml is not as high as that of bootstrap.yml, the bootstrap configuration file is definitely fine. , the result is that the project can’t live or die.

reason
The SpringBoot project will only recognize application.* configuration files, and will not automatically recognize bootstrap.yml.
The bootstrap.yml configuration is only used in the SpringCloud project. If you want to use the bootstrap.yml in the springboot project, then you need to add the bootstrap starter.

Add bootstrap initiator

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>

Since SpringCloud is built on SpringBoot, all SpringCloud projects are identified by both kinds of files, and it is only at this time that there is a priority statement that SpringCloud projects are given priority to read bootstrap configuration in reading application configuration.
SpringCloud applications are run based on the context of bootstrap.

[Solved] java.lang.IllegalAccessError: class org.springframework.data.redis.core.$ Proxy237 cannot access its superinterface org.springframework.data.redis.core.RedisConnectionUtils$RedisConnectionProxy

[resolved]

java.lang.IllegalAccessError: class org.springframework.data.redis.core.$ Proxy237 cannot access its superinterface org.springframework.data.redis.core.RedisConnectionUtils$RedisConnectionProxy

In the serviceImpl class operation redis reported the above error, after investigation found that the cause is in the (with write operation [@Transactional (readOnly = false)]) transaction method of operation redis, in the readOnly = true transaction method can be operated normally

ps: other versions of redis do not know if there is also this situation for the time being

solution: the operation of redis to get @Transactional (readOnly = false) method outside the operation can be

How to Solve zuul Forwarding error (No Retrayable)

Text

Service A restarts, zuul without adding a retry mechanism, and A service error exception will be reported

Solution: Modify gateway profile

hystrix:
    command:
        default:
            execution:
                isolation:
                    thread:
                        timeout-in-milliseconds: 20000
zuul:
  host:
    connect-timeout-millis: 20000
    socket-timeout-millis: 20000
  routes:
    #userMicroservices
    userService:
      #All requests with /user as the header are forwarded to user
      path: /user/**
      serviceId: user
      #url: http://localhost:8091
    pickupService:
      #All requests with /pickup as the header are forwarded to pickup
      path: /pickup/**
      serviceId: pickup
    orderService:
      #All requests with /order as the header are forwarded to order
      path: /order/**
      serviceId: order
  #Whether retryable is enabled
  retryable: true
ribbon:
  #resolve the timeout problem caused by zuul forwarding requests
  ReadTimeout: 60000 
  SocketTimeout: 60000
  # of retries for the current service
  MaxAutoRetries: 2
  # of times to switch the same Server
  MaxAutoRetriesNextServer: 0

Redis Delete dump.rdb Mistakenly [How to Solve]

1. Log in to redis database

[ root@localhost ~]# redis-cli -h 192.168.1.19
2. View redis configuration information

192.168.1.19:6379> info

2. According the path of config_file to set dump.rdb file storage path, or you can customize the path

192.168.1.19:6379> config set dir /storage/redis/

3. Save and exit

192.168.1.19:6379> save

192.168.1.19:6379> exit

4. Restart redis service

[ root@localhost ~]# service redis stop

[ root@localhost ~]# service redis start

Redis Error: (error) ERR Errors trying to SHUTDOWN. Check logs.

An error is reported when closing redis

(error) ERR Errors trying to SHUTDOWN. Check logs.

First, we need to understand that when we shutdown, redis will save the data, whether it is rdb or aof depends on your own settings. But when you save the file, you may encounter the save path does not exist, or the save path does not have permission, in the configuration file, the default save path for rdb is . /. So we have a problem because of path permissions.

Modify . / file permissions

[atguigu@hadoop100 bin]$ sudo chown atguigu:atguigu -R /usr/local/bin/redis-config/

Shut down again and stop successfully

[Solved] Redis Client On Error: Error: write ECONNABORTED Config right

Solve the redis client on error: error: write econnaborted config rightwe

Problem Description:
Solution:

1. First, check whether the firewall of Linux is turned on

Turn off the firewall

[root@localhost]# systemctl stop firewalld.service

Open 6379 port

[root@localhost]# sudo firewall-cmd --zone=public --add-port=6379/tcp --permanent
success
[root@localhost]# sudo firewall-cmd --reload
success

2. Check whether the redis startup configuration is correct

Check whether redis is started

 ps -ef | grep redis

For versions above redis 3.2, Internet access is not allowed by default, and needs to be modified redis.conf configuration file

Modify peetected-mode

Modify peotected-mode yes
to: protected-mode no.
#The protected-mode parameter is used to disable access to redis from outside the network, if enabled, only the localhost ip (127.0.0.1) will be able to access Redis

Close bind 127.0.0.1

Comment out bind 127.0.0.1, or modify bind 0.0.0.0, to allow access to all ip addresses

After modifying the configuration file, remember to restart redis,

./redis-server /usr/local/redis/redis.conf

How to Solve Error:java.io.InvalidClassException

Exception information:

Caused by:java. io. InvalidClassException: com. eastcom xxx. xxxxxx. bean. AlarmReq; local class incompatible: stream classdesc serialversionUID =8050743254081999660, local class seriaiversionuId = 6638111461888145730

Cause of exception:
when serializing objects, they will be stored in redis memory, and then through redistemplate getValueSerializer(). The deserialize () method deserializes the data to the bean object. If the current bean object changes, that is, if an attribute is added, the serialVersionUID will change.

Because the serialVersionUID of this class is generated by the JVM according to the class name and the hash value of its attributes during serialization. When the properties of the class change, the serialVersionUID will also change accordingly, resulting in an error when the serialVersionUID does not match when the old data in redis is deserialized.

Solution:

I. Add code before the error reporting class property
private static final long serialVersionUID = 8050743254081999660L;
Here the UID corresponds to the above stream classdesc serialversionUID
ii.Clear the redis data linked by the current service.Clear the redis data linked by the current service.

[Solved] redis Error: AttributeError: ‘list‘ object has no attribute ‘decode‘

An error occurred while [redis data management tool] was running!

AttributeError: ‘list’ object has no attribute ‘decode’

Solution:

1. redisutil_main.py under /www/server/panel/plugin/redisutil
2. Line 97 db=db, followed by decode_responses=True
3. Look for .decode(‘utf-8’) and delete, four out of four
4. Done!

[Solved] Springboot uses redis to add LocaldateTime Java 8 error

To store an object in redis, you need to serialize the object. If a field is of localdatetime type, an error will appear

com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 date/time type `java.time.LocalDateTime` not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling (through reference chain: com.gd.base.vo.redis.RedisSysUser["Corresponding fields"])

The program needs to deserialize the data in redis. The deserializer I use here is the following:

@Configuration
@EnableCaching//Allow us to use the cache
public class RedisConfig {
    /**
     * Cache expiration time (seconds)
     */
    public static final long CACHE_EXPIRE_SECEND = 3600 * 2;

    @Bean // At this point, load our redisTemplate into the context of our spring, applicationContext
    public RedisTemplate<String,Object> redisTemplate(RedisConnectionFactory factory){
        //1. Initialize a redisTemplate
        RedisTemplate<String,Object> redisTemplate=new RedisTemplate<String,Object>();
        //2. Serial words (generally used for key values)
        RedisSerializer<String> redisSerializer=new StringRedisSerializer();
        //3. Introduce the json string conversion class (generally used for value processing)
        Jackson2JsonRedisSerializer jackson2JsonRedisSerializer=new Jackson2JsonRedisSerializer(Object.class);
        ObjectMapper objectMapper=new ObjectMapper();
        //3.1 Set the access rights of objectMapper
        objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
        //3.2 Specify the serialized input type, that is, store the data in the database to the redis cache according to certain types.
        </objectMapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);// Recently upgraded SpringBoot, found that enableDefaultTyping method expired. You can use the following method instead
        objectMapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance,ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As. WRAPPER_ARRAY);
        jackson2JsonRedisSerializer.setObjectMapper(objectMapper);
        //4. Create the link
        redisTemplate.setConnectionFactory(factory);
        //4.1 redis key value serialization
        redisTemplate.setKeySerializer(redisSerializer);
        //4.2 value serialization, because most of our values are converted through objects, so use jackson2JsonRedisSerializer
        redisTemplate.setValueSerializer(jackson2JsonRedisSerializer);
        // 4.3 Serialization of value, serialization of hashmap
        redisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer);
        return redisTemplate;
    }

    @Bean
    public CacheManager cacheManager(RedisConnectionFactory factory){
        // 1. Serial words (generally used for key values)
        RedisSerializer<String> redisSerializer=new StringRedisSerializer();
        //2. Introduce the json string conversion class (generally used for value processing)
        Jackson2JsonRedisSerializer jackson2JsonRedisSerializer=new Jackson2JsonRedisSerializer(Object.class);
        ObjectMapper objectMapper=new ObjectMapper();
        //2.1 Set the access rights of objectMapper
        objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
        //2.2 Specify the serialized input type, that is, store the data in the database to the redis cache according to a certain type.
        </objectMapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);// Recently upgraded SpringBoot, found that enableDefaultTyping method expired. You can use the following method instead
        objectMapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance,ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As. WRAPPER_ARRAY);
        jackson2JsonRedisSerializer.setObjectMapper(objectMapper);
        //3. Serialization configuration, garbled problem solving and timeliness of our cache
        RedisCacheConfiguration config=RedisCacheConfiguration.defaultCacheConfig().
                entryTtl(Duration.ofSeconds(CACHE_EXPIRE_SECEND)). // Cache timeliness setting
                serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(redisSerializer)). //key serialization
                serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(jackson2JsonRedisSerializer)). //value serialization
                disableCachingNullValues();//null values are not stored in the cache
        //4. Create the cacheManager link and set the properties
        RedisCacheManager cacheManager= RedisCacheManager.builder(factory).cacheDefaults(config).build();
        return cacheManager;
    }

}

Processing error reports:
① add comments to the corresponding fields

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)

The error report is gone