getting value from one controller to another controller
How can I get value from one controller to another controller u开发者_如何学运维sing Spring framework
Inject the needed controller into the one that needs it (using @Resource
, @Autowired
, @Inject
(spring 3), or applicationContext.xml). Like:
@Controller
public class SomeController {
@Autowired
private NeededController neededController;
...
}
精彩评论