迎着风跑  

2021年10月15日

摘要: 一、SpringBoot单元测试 1、引入启动器 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId></dependency> <font 阅读全文
posted @ 2021-10-15 18:37 迎着风跑 阅读(1097) 评论(0) 推荐(1) 编辑
 
摘要: 1.1 th:text 例如<span th:text="Hello"></span> 如果是变量,要确保后台返回了该属性的变量,不然页面会有异常<span th:text="${msg}"></span> 1.2 th:value <input type="text" name="userName 阅读全文
posted @ 2021-10-15 18:32 迎着风跑 阅读(767) 评论(0) 推荐(0) 编辑
 
摘要: <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.3.7.RELEASE</version></parent><dep 阅读全文
posted @ 2021-10-15 18:00 迎着风跑 阅读(403) 评论(0) 推荐(0) 编辑
 
摘要: DatabasePropertiesConfig中的内容(数据库连接信息): @PropertySource(value = {"classpath:db.properties"})public class DataBasePropertiesConfig { @Value("${jdbc.driv 阅读全文
posted @ 2021-10-15 17:54 迎着风跑 阅读(103) 评论(0) 推荐(0) 编辑
 
摘要: <dependencies> <!--junit--> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </depende 阅读全文
posted @ 2021-10-15 16:51 迎着风跑 阅读(746) 评论(0) 推荐(0) 编辑