This is an automated email from the ASF dual-hosted git repository. xxyu pushed a commit to branch kylin5 in repository https://gitbox.apache.org/repos/asf/kylin.git
commit db19826dd51bc441ed5b19a5b2e8e253e522a377 Author: huangsheng <huangshen...@163.com> AuthorDate: Fri Jun 9 19:14:37 2023 +0800 KYLIN-5720 Fix bug that all node can not get sessionid from http requert which redirect by query node caused by commit 'prevent early initialization of SessionRepository beans' from spring community Fix bug that all node can not get sessionid from http requert which redirect by query node caused by commit 'prevent early initialization of SessionRepository beans' from spring community https://github.com/spring-projects/spring-boot/issues/35240 --- .../main/java/org/apache/kylin/rest/config/AppInitializer.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/common-service/src/main/java/org/apache/kylin/rest/config/AppInitializer.java b/src/common-service/src/main/java/org/apache/kylin/rest/config/AppInitializer.java index e0dec7a413..5a2a833305 100644 --- a/src/common-service/src/main/java/org/apache/kylin/rest/config/AppInitializer.java +++ b/src/common-service/src/main/java/org/apache/kylin/rest/config/AppInitializer.java @@ -71,6 +71,7 @@ import org.springframework.scheduling.TaskScheduler; import lombok.val; import lombok.extern.slf4j.Slf4j; +import org.springframework.session.web.http.CookieSerializer; @Slf4j @Configuration @@ -93,6 +94,14 @@ public class AppInitializer { @Autowired ApplicationContext context; + // https://github.com/spring-projects/spring-boot/issues/35240 + // since spring-boot-autoconfigure:2.7.12, the commit will + // prevent early initialization of SessionRepository beans. + // But we want the cookieSerializer to be initialized before init, + // so we autowired it here. + @Autowired + CookieSerializer cookieSerializer; + JdbcStreamingJobStatsStore streamingJobStatsStore; @PostConstruct