This PR fixes the issue #33463.

With the new release of Spring Boot v3 the SpringBootJdbcHttpSessionConfiguration was replaced with the SessionRepositoryCustomizer.

@Bean
SessionRepositoryCustomizer<JdbcIndexedSessionRepository> springBootSessionRepositoryCustomizer(
        SessionProperties sessionProperties, JdbcSessionProperties jdbcSessionProperties,
        ServerProperties serverProperties) {
    return (sessionRepository) -> {
        PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull();
        map.from(sessionProperties.determineTimeout(() -> serverProperties.getServlet().getSession().getTimeout()))
                .to(sessionRepository::setDefaultMaxInactiveInterval);

        map.from(jdbcSessionProperties::getTableName).to(sessionRepository::setTableName); // --> relevant line
        map.from(jdbcSessionProperties::getFlushMode).to(sessionRepository::setFlushMode);
        map.from(jdbcSessionProperties::getSaveMode).to(sessionRepository::setSaveMode);
        map.from(jdbcSessionProperties::getCleanupCron).to(sessionRepository::setCleanupCron);
    };

}

This change led to the linked issue because in the Spring Session project the line in JdbcHttpSessionConfiguration now has more than one sessionRepositoryCustomizers and they are executed in the wrong order.

@Bean
public JdbcIndexedSessionRepository sessionRepository() {
    // ...
    JdbcIndexedSessionRepository sessionRepository = new JdbcIndexedSessionRepository(jdbcTemplate,
            this.transactionOperations);
    // ...
    this.sessionRepositoryCustomizers
            .forEach((sessionRepositoryCustomizer) -> sessionRepositoryCustomizer.customize(sessionRepository));
    return sessionRepository;
}

By default the first few session repository customizer are the custom defined one's (e.g. a PostgreSqlJdbcIndexedSessionRepositoryCustomizer, it updates a query). After that the springBootSessionRepositoryCustomizer is executed which sets the table name and in return updates all queries to their respective defaults (see here).

public void setTableName(String tableName) {
    Assert.hasText(tableName, "Table name must not be empty");
    this.tableName = tableName.trim();
    prepareQueries(); // --> this line updates all queries to their defaults
}

To fix this the order of the springBootSessionRepositoryCustomizer bean is set to highest precedence so that the bean is the first one in the list.

This fix should be identical to the implementation in Spring Boot 2.7 because in the "old" implementation the logic of springBootSessionRepositoryCustomizer is executed before other customizer's.