摘要: 1. 视图里如何写路径变量 form标签里面写路径 以th:属性开头路径写在以@开头的花括号里面 a标签写路径 直接以/开头写路径即可 2.控制器里如何写路径变量 以redirect开头为跳转 直接写为传递数据 阅读全文
posted @ 2019-06-27 20:41 麦克斯-侯 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 1.示例 阅读全文
posted @ 2019-06-27 20:30 麦克斯-侯 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1.示例 以@开头前面的{id}是占位符,后面的(id=${user.id})是实际值 阅读全文
posted @ 2019-06-27 20:28 麦克斯-侯 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 首先在html开始标签中引入一个属性 1 xmlns:th="http://www.thymeleaf.org" 1 xmlns:th="http://www.thymeleaf.org" 1 xmlns:th="http://www.thymeleaf.org" 1 xmlns:th="http: 阅读全文
posted @ 2019-06-27 17:51 麦克斯-侯 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 首先在html开始标签中引入一个属性 xmlns:th="http://www.thymeleaf.org" 遍历数据示例 <tbody> <tr th:each="user:${users}"> <td th:text="${user.name}"></td> <td th:text="${use 阅读全文
posted @ 2019-06-27 17:48 麦克斯-侯 阅读(8948) 评论(0) 推荐(0) 编辑
摘要: 控制器示例 扫描包注解代码 @SpringBootApplication(scanBasePackages = {"cn.maxhou.*"})引号内为包名,支持*通配符 为什么要扫描包? spring 机制,被spring 扫描后,才可能被实例化(被实例化才被调用) 如果使用@Controller 阅读全文
posted @ 2019-06-27 17:38 麦克斯-侯 阅读(850) 评论(0) 推荐(0) 编辑
摘要: 1.包分三层 配置包 控制器包 模型包 视图层 模板放 src/main/resources下的templates目录下 阅读全文
posted @ 2019-06-27 17:35 麦克斯-侯 阅读(267) 评论(0) 推荐(0) 编辑
百纵科技