Redirection/session problem with Spring Boot app in Azure

Adam 196 Reputation points
2021-09-15T12:43:40.57+00:00

I have a stateful Spring Boot application with Thymeleaf frontend, running in an App Service (using Azure Docker Registry).

When I deploy the app, some issues happen:

  • during redirection, the redirectAttributes#addFlashAttribute is not working; Thymeleaf doesn't receive the flash attribute object
  • logging in to the app without remember me doesn't work, can only login with remember me cookie

These issues started to happen recently, and only when running the app in Azure. When I run it in local Docker or IntelliJ regardless the env (prod/dev), it works perfectly. I don't have either multiple instances or load balancer (it's a small production plan - S1 tier).

Besides this, I have already set the ARR affinity 'On' under the Configuration > General settings, but still no luck.

Versions:

  • Spring Boot: spring-boot-starter-parent -> 2.3.5.RELEASE
  • Docker: openjdk:14-jdk-alpine
Azure Spring Apps
Azure Spring Apps
An Azure platform as a service for running Spring Boot applications at cloud scale. Previously known as Azure Spring Cloud.
110 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,924 questions
0 comments No comments
{count} votes

Accepted answer
  1. Adam 196 Reputation points
    2021-09-16T07:26:26.223+00:00

    Found the issue, we had to update Spring Boot: 2.3.5.RELEASE -> 2.5.4


0 additional answers

Sort by: Most helpful