I am trying to forward a request from one controller to another, but instead I am getting an exception
java.lang.IllegalStateException: Could not resolve view with name 'forward:/test2'. at org.springframework.web.reactive.result.view.ViewResolutionResultHandler.lambda$resolveViews$5(ViewResolutionResultHandler.java:272) ~[spring-web-reactive-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
Here are my controllers :
@Controller
class TestController {
@RequestMapping(value="/test")
public String showTestPage() {
return "forward:/test2";
}
}
@RestController
public class TestController2 {
@RequestMapping(value="/test2")
public String showTestPage() {
return "testPageView";
}
}
I am using spring-boot
springBootVersion = '2.0.0.BUILD-SNAPSHOT' compile('org.springframework.boot.experimental:spring-boot-starter-web-reactive')
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
This is not supported at the moment.
Please create a new issue on https://jira.spring.io (project: Spring Framework, component: reactive). Some concepts don't really map into the reactive world, so I'm not 100% sure this should be implemented.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With