Skip to content

Commit

Permalink
AL-8554 Fix bug that all node can not get sessionid from http requert…
Browse files Browse the repository at this point in the history
… which redirect by query node caused by commit 'prevent early initialization of SessionRepository beans' from spring community (#30507)

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 14, 2023
1 parent a589d64 commit abf4964
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 abf4964

Please sign in to comment.