log不会打印?为啥?显示啥的都正常,用syso可以看到调用页面时候的输出。
@RequestMapping(value = "/view", method = RequestMethod.GET)
public String viewCourse(@RequestParam("courseId") Integer courseId,Model model){
System.out.println("this is course controller");
System.out.println("In viewCourse,courseID = {}" + courseId);
log.debug("In viewCourse,courseID = {}" + courseId);
Course course = courseService.getCoursebyId(courseId);
model.addAttribute(course);
return "course_overview";
}
找到问题原因了,多打了个逗号。
应该为log.debug("In viewCourse,courseID = {}" , courseId);