上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页
摘要: 测试框架01-MockMvc、Mock和Spy 1.MockMvc @SpringBootTest @AutoConfigureMockMvc // 将MockMvc注入到容器中 class UserControllerTest { @Resource private MockMvc mockMvc 阅读全文
posted @ 2022-08-09 19:52 行稳致远方 阅读(312) 评论(0) 推荐(0)
摘要: Docker02-应用部署 1.Nginx # /home/data/nginx/conf/nginx.conf下需要有nginx.conf文件。 # /home/data/nginx/html挂载后为空。 docker run -d --name nginx8088 -p 8080:80 \ -v 阅读全文
posted @ 2022-06-29 12:10 行稳致远方 阅读(93) 评论(0) 推荐(0)
摘要: Mybatis进阶-类型处理器和SQL拦截器 1.类型处理器 Mybatis之所以可以完成数据库类型和Java类型之间的转换,是通过很多的类型处理器来实现的。如IntegerTypeHandler、StringTypeHandler。 如果数据库中保存的是1,2,3,Java类型是List。即通过* 阅读全文
posted @ 2022-06-01 15:07 行稳致远方 阅读(113) 评论(0) 推荐(0)
摘要: 算法04-动态规划 1.动态规划-硬币找零 public class CoinChange { // coin value, used calculateUseBackTracking() //private final int[] coinValue = {10, 5, 2, 1}; // coi 阅读全文
posted @ 2022-05-28 16:07 行稳致远方 阅读(12) 评论(0) 推荐(0)
摘要: 算法03-分治算法 1.分治算法-快速排序 public class QuickSort { public void printArrays(int[] arrays) { for (int array : arrays) System.out.println(array); } public vo 阅读全文
posted @ 2022-05-28 16:04 行稳致远方 阅读(9) 评论(0) 推荐(0)
摘要: 算法02-回溯算法 1.回溯算法-八皇后 /** * row and col not cat save more queen */ public class EightQueen { private final ThreadLocal<Integer> threadLocal = new Threa 阅读全文
posted @ 2022-05-28 16:02 行稳致远方 阅读(11) 评论(0) 推荐(0)
摘要: 算法01-贪心算法 1.贪心算法-装箱问题 有一批礼物,体积为n1...n2。现在需要将这一批礼物装到体积为V的盒子中,计算最少需要多少个盒子? 算法实现思路,将礼物直接装到盒子中,如果盒子的剩余体积不够就直接打开新的盒子去装礼物。 代码实现。 /** * box volume is five * 阅读全文
posted @ 2022-05-28 15:56 行稳致远方 阅读(37) 评论(0) 推荐(0)
摘要: Hibernate03-基础-JPA 1.hibernate和JPA的关系 jpa中定义了操作数据库的接口,hibernate是JPA的一种实现。 JPA的其他两种实现TopLink和OpenJPA。 2.JPA注解开发 实体类。 @Data @Entity @Table(name = "tb_cu 阅读全文
posted @ 2022-04-10 08:08 行稳致远方 阅读(67) 评论(0) 推荐(0)
摘要: Hibernate02-基础 1.基本查询-get和load @Test public void baseQueryForLoad() { // load(),延时加载 Customer customer = session.load(Customer.class, 8); System.out.p 阅读全文
posted @ 2022-04-10 08:07 行稳致远方 阅读(57) 评论(0) 推荐(0)
摘要: Hibernate01-基础 1.Hibernate入门程序 引入依赖。 <dependencies> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> </dependency 阅读全文
posted @ 2022-04-10 08:06 行稳致远方 阅读(36) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页