1、在昨天的基础上把实体类中创建带参、无参的构造方法;

2、在controller中创建一个获取所有开销、和保存开销的方法;

学习springmvc的第十天(保存)

3、在list.jsp新加一个请求,通过后天跳转到增加页面;

学习springmvc的第十天(保存)

4、在view下新建一个input.jsp在其中导入springmvc的form表达式;

学习springmvc的第十天(保存)

学习springmvc的第十天(保存)学习springmvc的第十天(保存)学习springmvc的第十天(保存)

其中碰到的问题:

java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'command' available as request attribute

是因为从list页面到input页面之间需要一个对象来展示信息(后台定义了一个空的对象,再在input.jsp的form表中设置了modelAttribute指向它);

 Could not instantiate property type:是因为实体类没有创建无参的构造函数;




相关文章:

  • 2021-06-02
  • 2021-08-13
  • 2021-08-18
  • 2021-08-02
  • 2021-07-07
  • 2021-08-10
  • 2021-04-18
  • 2021-08-17
猜你喜欢
  • 2021-07-09
  • 2021-08-03
  • 2021-08-06
  • 2021-08-26
  • 2021-04-11
  • 2021-10-16
  • 2021-09-10
相关资源
相似解决方案