Skip to content

Spring WebFlux doesn't handle redirect: directives when media type is requested [SPR-15291] #19857

@spring-projects-issues

Description

@spring-projects-issues

Greg Turnquist opened SPR-15291 and commented

The following code...

@Controller
public class WelcomeController {

    @GetMapping("/")
    @ResponseBody
    public String welcome() {
        return "Hello World";
    }

    @GetMapping("/redir")
    public Mono<String> redir() {
        return Mono.just("redirect:/");
    }
}

generates the following stacktrace...

java.lang.IllegalStateException: Could not resolve view with name 'redirect:/'.
    at org.springframework.web.reactive.result.view.ViewResolutionResultHandler.lambda$resolveViews$5(ViewResolutionResultHandler.java:274)

Affects: 5.0 M5

Issue Links:

Referenced from: commits 226c9f9, 718162b

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions