摘要: pom.xml 添加 JUnit依赖 阅读全文
posted @ 2018-02-05 15:18 多啦C梦 阅读(25201) 评论(0) 推荐(0) 编辑
摘要: 缺失 import org.apache.commons.fileupload.FileUploadException; 包在pom.xml文件加上 <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-file 阅读全文
posted @ 2018-01-27 19:47 多啦C梦 阅读(5916) 评论(0) 推荐(0) 编辑
摘要: 玩转spring boot——简单登录认证 阅读全文
posted @ 2018-01-25 22:03 多啦C梦 阅读(1142) 评论(0) 推荐(0) 编辑
摘要: 像上面这样,获取 session,如果session为空,无法返回模板,会提示 Missing session attribute 'user' of type List 错误 解决方法如下: 用 HttpSession session 代替 @SessionAttribute(WebSecurit 阅读全文
posted @ 2018-01-24 20:56 多啦C梦 阅读(6361) 评论(0) 推荐(0) 编辑
摘要: @RequestMapping 和 @GetMapping @PostMapping 区别 @GetMapping是一个组合注解,是@RequestMapping(method = RequestMethod.GET)的缩写。 @PostMapping是一个组合注解,是@RequestMapping 阅读全文
posted @ 2018-01-24 16:51 多啦C梦 阅读(90537) 评论(4) 推荐(11) 编辑
摘要: pom.xml增加 application.properties参数增加或修改 阅读全文
posted @ 2018-01-24 10:57 多啦C梦 阅读(717) 评论(0) 推荐(0) 编辑
摘要: Thymeleaf 模板 引用头部 尾部 最简单教程 我们可以新建一个简单的页尾模板,如:/WEB-INF/templates/footer.html,内容如下: 上面定义了一个叫做copyright的片段,接着我们可以使用th:include或者th:replace属性来使用它: Thymelea 阅读全文
posted @ 2018-01-23 17:41 多啦C梦 阅读(6005) 评论(0) 推荐(0) 编辑
摘要: IDEA 如何弹出Select classes to import 阅读全文
posted @ 2018-01-23 14:53 多啦C梦 阅读(3014) 评论(3) 推荐(0) 编辑
摘要: 首先link 和 script 如上图写, 第二就是 1. css 那些要放在static下 2,模板放在templates下 阅读全文
posted @ 2018-01-22 17:48 多啦C梦 阅读(12765) 评论(0) 推荐(0) 编辑
摘要: 网址Url 输错了, 我的具体如下 http://localhost:8080/items/home_item 去掉里面的s就正常了 http://localhost:8080/item/home_item 阅读全文
posted @ 2018-01-22 09:39 多啦C梦 阅读(13078) 评论(1) 推荐(0) 编辑