开发者

getting value from one controller to another controller

开发者 https://www.devze.com 2022-12-19 09:54 出处:网络
How can I get value from one controller to another controller u开发者_如何学运维sing Spring frameworkInject the needed controller into the one that needs it (using @Resource, @Autowired, @Inject (spri

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;

    ...
}
0

精彩评论

暂无评论...
验证码 换一张
取 消