摘要: 、导入版本信息跟依赖 2、Thymeleaf使用 只要我们把HTML页面放在classpath:/templates/,thymeleaf就能自动渲染;使用:1、导入thymeleaf的名称空间 2、使用thymeleaf语法; 3、语法规则1)、th:text;改变当前元素里面的文本内容;th:任 阅读全文
posted @ 2018-12-13 11:01 dogma_f 阅读(616) 评论(0) 推荐(0) 编辑
摘要: https://www.webjars.org/ webjars添加前端页面需要的静态依赖 http://localhost:8080/webjars/jquery/3.3.1/jquery.js 查看jquery.js文件 “/**”访问当前项目的任何资源(静态资源的文件夹) localhost: 阅读全文
posted @ 2018-12-12 17:43 dogma_f 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 才开始学习spring boot,第一个程序helloworld就碰到@RestController和@RequestMapping(/hello)的注解都会报错的问题。 我个人的解决方法: 1.springboot默认有 这时要引入Web模块,需在pom.xml添加spring-boot-star 阅读全文
posted @ 2018-12-12 14:57 dogma_f 阅读(1054) 评论(0) 推荐(0) 编辑
摘要: alt+insert键调出getter and serter 和 toString()方法。 在application.yml上添加相关的数据: 键值数据之间记得加空格: 例:{k1:空格v1} 将配置文件中的数据映射到persion组件中 进入test单元测试: 是一个SpringBoot的单元测 阅读全文
posted @ 2018-12-12 11:44 dogma_f 阅读(2490) 评论(0) 推荐(0) 编辑