问题描述
- struts2中关于ApplicationAware
-
public class TestAware implements ApplicationAware{public String execute(){
//1. 向 application 中加入一个属性: applicationKey2 - applicationValue2 application.put("applicationKey2", "applicationValue2"); //2. 从 application 中读取一个属性 date, 并打印. System.out.println(application.get("date")); return "success"; } private Map<String, Object> application; @Override public void setApplication(Map<String,Object> aplicationMap) { // TODO Auto-generated method stub this.application = application; }
}
解决方案
Struts2
----------------------
解决方案二:
请问楼主想要表达什么意思?
时间: 2024-10-22 10:58:55