?? feedcontroller.java.svn-base
字號:
package com.google.code.rsser.web.controller;import java.util.HashMap;import java.util.Map;import javax.servlet.http.HttpServletResponse;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RequestMethod;import org.springframework.web.bind.annotation.RequestParam;import org.springframework.web.servlet.ModelAndView;import com.google.code.rsser.service.EntryService;import com.google.code.rsser.service.FeedService;import com.google.code.rsser.service.UserService;@Controller@RequestMapping(value = "/feed.html")public class FeedController extends AbstractPreparedController { @Autowired protected FeedService feedService; @Autowired protected EntryService entryService; @Autowired protected UserService userService; @RequestMapping(method = RequestMethod.GET) public ModelAndView feedsAction(HttpServletResponse response, @RequestParam(required = false, value = "feedId") Integer id) { if (id == null) { response.setStatus(HttpServletResponse.SC_NOT_FOUND); return null; } Map<String, Object> model = new HashMap<String, Object>(); model.put("feed", feedService.get(id)); model.put("readEntries", entryService.getRead(userService.getCurrent(), id)); return new ModelAndView("feed", model); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -