摘要: 异常流程 :controller-ControllerAdvice-异常解析器-默认的error页面 1.错误页面error.html: 程序出现异常会自动跳到error.html里,视频效果,该页面可以使用th:text="${exception}"显示异常信息,但自己测试时,页面成功显示,但异常 阅读全文
posted @ 2019-03-14 19:52 hcss 阅读(1276) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/xxb5502296/article/details/78319898(挺全的) https://blog.csdn.net/qq_43279637/article/details/86406836 http://www.cnblogs.com/vinph 阅读全文
posted @ 2019-03-14 16:08 hcss 阅读(466) 评论(0) 推荐(0) 编辑
摘要: 1.后台代码 public String indexPage(User ss){ss.setId(11);ss.setName("XXXX"); 前台 th:text="${user.id}虽然ss跟user不一致,但前台都获取到值了。 如果user对象的id为null,不报错,界面id显示空内容。2.后台代码 public String indexPage(User ss){ss.se... 阅读全文
posted @ 2019-03-14 02:26 hcss 阅读(102) 评论(0) 推荐(0) 编辑
摘要: org.springframework.ui.Model(接口)传递数据,Spring框架自动创建它的一个实现类,如BindingAwareModelMap org.springframework.ui.ModelMap(类):传递数据,Spring框架自动创建modelmap的实例,并作为cont 阅读全文
posted @ 2019-03-14 02:00 hcss 阅读(550) 评论(0) 推荐(0) 编辑
摘要: 1.实体类属性上添加注解规则 如 阅读全文
posted @ 2019-03-14 01:13 hcss 阅读(789) 评论(0) 推荐(0) 编辑
摘要: <font color="red" th:text="开始了">font外</font>页面显示红色字体 开始了 (同时存在,则前者覆盖了后者,总的来说是以前者为准) <font color="red" >font外</font> 页面显示红色字体 font外 <font color="red" t 阅读全文
posted @ 2019-03-14 00:36 hcss 阅读(770) 评论(0) 推荐(0) 编辑