订单在 PaymentController 中生成,然后发送到ThankyouController
@Results({
@Result(name="create", type="redirectAction",
params = {"actionName" , "thankyou", "order", "${order}"})
})
public class PaymentController {
private Order order;
public Order getOrder()
return order;
public void setOrder(Order order)
this.order = order;
public String create()
order = generateOrder();
return "create";
}
public class ThankyouController
private Order order;
public HttpHeaders index()
{
System.out.println("---------------------" + order + "-----------------------------");
return new DefaultHttpHeaders("index").withStatus(200);
}
public Order getOrder()
return order;
public void setOrder(Order order)
this.order = order;
但由于某些原因,我不断在ThankyouController 中获得Null 值。
谁能建议我在不使用 session 的情况下在动作之间传递价值的正确方法?