Spring Boot分布式集群 - 集成Nginx

2024-10-18 10:32:28

1、演示1 - 内置Tomcat 在application.properties中增加配置信息。

Spring Boot分布式集群 - 集成NginxSpring Boot分布式集群 - 集成Nginx

4、将当前Application启动类继承SpringBootServletInitializer, 并重写方法configure。

Spring Boot分布式集群 - 集成NginxSpring Boot分布式集群 - 集成Nginx

7、spring.session.store-type 取值要么是redis,要么是none增加集成配置类

Spring Boot分布式集群 - 集成Nginx

8、实体对象序列化设置Redis Session共享后,如果向Session中保存数据,需要让数据对象实现可序列化接口java.io.Serializable!!! 分别启动Nginx, 2个Web应用,观察是否集成成功

猜你喜欢