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-issuemaster opened this issue Aug 22, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.