发表于: 2018-01-12 23:31:03
1 702
1、在github上传ppt
2、视频部分,误删了,正在补录
3、写一写今天看过的东西
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>jsp/welcome.jsp</welcome-file>
<!--在这里配置启动tomcat的首个页面-->
</welcome-file-list>
@Test
public void insertStudent() throws Exception {
service.insertStudent(new Student(14,"dd","ddd","33"));
System.out.println("插入成功");
@Test
public void deleteStudentById() throws Exception {
service.deleteStudentById(14);
System.out.println("删除成功!");
@Test
public void updateStudent() throws Exception{
/*service.updateStudent(new Student(102L,"ss","ddd",3306));*/
System.out.println("修改成功");
}
1、写写周总结, 对一周的学习情况很糟糕进行分析
2、加快解决页面跳转显示问题
1、updateStudent这样写跟insert一模一样,写student stu=new student;stu.setName(""),等等我也没跑出来,但是这个changeUtil类应该能辅助写个简单的update测试类,我再搜搜看看。
public static Student studentChange(StudentGet sg){
Student s = new Student();
s.setId(sg.getId());
s.setName(sg.getName());
s.setType(sg.getType());
s.setNumber(sg.getNumber());
return s;
}
z/*service.updateStudent(new Student(102L,"ss","ddd",3306));*/
2、通过controller跳转jsp页面时,看到别人的日报和书上都有这个modelandview,那么他的作用是什么,为什么没用到,用哪种方法代替了。
ModelAndView类别提供实作View接口的对象来作View的参数:
ModelAndView类别就如其名称所示,是代表了MVC Web程序中Model与View的对象
ModelAndView(View view)
ModelAndView(View view, Map model)
ModelAndView(View view, String modelName, Object modelObject)
对应的@pathvariable的用法
public String getdata(@PathVariable("id") Integer id, ModelMap model)
四、收获
是否有延期风险:有,任务进度缓慢,学习方向不明,乱撞。解决办法:当前问题是数据没有经过/student/index,导致页面主体是没有数据,从欢迎页跳转/student/index就是 Request method 'GET' not supported
禅道:http://task.ptteng.com/zentao/my-task-openedBy-project_asc-117-20-3.html
评论