I'm sure there is some way to accomplish what I'd like here, but I haven't been able to find it in the documentation
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping(value = "/test")
public class TestController {
@RequestMapping(value = "/one")
public String one(Model m) {
System.out.println("one: m = " + m);
m.addAttribute("one", "valueone");
return "redirect:two";
}
@RequestMapping(value = "/two")
public String two(Model m) {
System.out.println("two: m = " + m);
return "redirect:three";
}
@RequestMapping(value = "/three")
public String three(Model m) {
System.out.println("three: m = " + m);
return "redirect:one/two/three";
}
@RequestMapping(value = "/one/two/three")
public String dest(Model m) {
System.out.println("one/two/three: m = " + m);
return "test";
}
}
What I would expect here is to see that the model attribute "one" with value of "valueone" should be present in the method calls two(), three() and dest(), however it is quite conspicuous by it's absence. How would I make this work as expected?