📄 displaycoursethrowawaycontroller.java
字号:
package com.springinaction.training.mvc;import org.springframework.web.servlet.ModelAndView;import org.springframework.web.servlet.mvc.throwaway.ThrowawayController;import com.springinaction.training.model.Course;import com.springinaction.training.service.CourseService;public class DisplayCourseThrowawayController implements ThrowawayController { private Integer id; public void setId(Integer id) { this.id = id; } public ModelAndView execute() throws Exception { Course course = courseService.getCourse(id); return new ModelAndView("courseDetail", "course", course); } private CourseService courseService; public void setCourseService(CourseService courseService) { this.courseService = courseService; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -