最近在研究jeecms源码,他的框架是spring mvc+freeer,我想问下里面的env.getGlobalVariable(SITE);这个freeer的getGlobalVariable里面的值是什么时候放进去的呀?谢谢

解决方案 »

  1.   

    首先你访问首页(http://localhost:8080/index.jhtml),就会调用DynamicPageAct.java这个控制器String index(HttpServletRequest request, ModelMap model)方法。然后可以看到这句话FrontUtils.frontData(request, model, site);进入这个方法,可以看到frontData(map, site, user, location, startTime)这个函数,然后进去,就可以看到这个map.put(SITE, site);就是这里set进去的。。