Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebFlux @MVC Controllers do not support @SessionAttributes. (plus SessionStatus) [SPR-15887] #20442

Closed
spring-projects-issues opened this issue Aug 22, 2017 · 0 comments
Assignees
Labels
in: web type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Aug 22, 2017

Jean opened SPR-15887 and commented

@SessionAttributes is not supported by webflux.

I am expecting same @MVC code work in both servlet or netty environment.

A very simple example (spring-boot, kotlin, thymeleaf):

DemoController.kt

@Controller
@SessionAttributes("a")
class DemoController {

    @GetMapping
    fun index(model: Model): String {
        val old_a = model.asMap()["a"] as? Int
        val a = 1 + (old_a ?: 0)

        model["a"] = a

        return "index"
    }
}

index.html

<!DOCTYPE html>
<html>

<body th:text="${a}">
</body>

</html>

This demo works as expected - increasing numbers displayed for each request in web brower - with webmvc,
but not working - the number is always 1 - with webflux.

There's no SessionStatus argument resolver in webflux too.


Affects: 5.0 RC3

Referenced from: commits f76ac5b

@spring-projects-issues spring-projects-issues added type: enhancement in: web labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 5.0 RC4 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants