question

82549142 avatar image
0 Votes"
82549142 asked Grmacjon-MSFT commented

Redirection/session problem with Spring Boot app in Azure

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-webappsazure-webapps-developmentazure-webapps-authenticationazure-spring-cloud
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

82549142 avatar image
0 Votes"
82549142 answered Grmacjon-MSFT commented

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

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for sharing the solution that worked for you.

0 Votes 0 ·