PortalController.java 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. package com.goafanti.common.controller;
  2. import javax.annotation.Resource;
  3. import javax.servlet.http.HttpServletRequest;
  4. import org.springframework.stereotype.Controller;
  5. import org.springframework.web.bind.annotation.RequestMapping;
  6. import org.springframework.web.bind.annotation.RequestMethod;
  7. import org.springframework.web.bind.annotation.ResponseBody;
  8. import org.springframework.web.servlet.ModelAndView;
  9. import org.springframework.web.servlet.view.RedirectView;
  10. import com.goafanti.achievement.service.AchievementService;
  11. import com.goafanti.business.service.BusinessProjectService;
  12. import com.goafanti.common.bo.Result;
  13. import com.goafanti.common.service.DistrictGlossoryService;
  14. import com.goafanti.common.service.FieldGlossoryService;
  15. import com.goafanti.demand.service.DemandInterestService;
  16. import com.goafanti.demand.service.DemandService;
  17. import com.goafanti.order.service.OrderService;
  18. import com.goafanti.user.service.UserIdentityService;
  19. import com.goafanti.user.service.UserService;
  20. @Controller
  21. public class PortalController extends BaseController {
  22. @Resource
  23. private FieldGlossoryService glossoryService;
  24. @Resource
  25. private AchievementService achievementService;
  26. @Resource
  27. private DemandService demandService;
  28. @Resource
  29. UserIdentityService userIdentityService;
  30. @Resource
  31. private FieldGlossoryService fieldGlossoryService;
  32. @Resource
  33. private DemandInterestService demandInterestService;
  34. @Resource
  35. private UserService userService;
  36. @Resource
  37. private DistrictGlossoryService districtglossoryservice;
  38. @Resource
  39. BusinessProjectService businessProjectService;
  40. @Resource
  41. OrderService orderService;
  42. @RequestMapping(value = "/index", method = RequestMethod.GET)
  43. public ModelAndView index(HttpServletRequest request, ModelAndView modelview) {
  44. return home(request, modelview);
  45. }
  46. @RequestMapping(value = "/", method = RequestMethod.GET)
  47. public ModelAndView home(HttpServletRequest request, ModelAndView modelview) {
  48. RedirectView rv = new RedirectView();
  49. rv.setUrl(request.getContextPath() + "/portal/index");
  50. rv.setExposeModelAttributes(false);
  51. modelview.setView(rv);
  52. return modelview;
  53. }
  54. }