Skip to content

Commit

Permalink
KYLIN-5720 Fix bug that all node can not get sessionid from http requ…
Browse files Browse the repository at this point in the history
…ert 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
spring-projects/spring-boot#35240
  • Loading branch information
Mrhs121 authored and hongrong.cao committed Nov 17, 2023
1 parent a3bf289 commit 3592245
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@

import lombok.val;
import lombok.extern.slf4j.Slf4j;
import org.springframework.session.web.http.CookieSerializer;

@Slf4j
@Configuration
Expand All @@ -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
Expand Down

0 comments on commit 3592245

Please sign in to comment.