摘要: ## try catch finaly 注意点 ### 1.finaly块中有return语句 #### 1.1 有异常出现的场景 示例程序: ```java public static void main(String[] args) { System.out.println(throwExcep 阅读全文
posted @ 2023-06-01 13:38 Yorkey 阅读(10) 评论(0) 推荐(0)
摘要: 1.JSON字符串 -> 对象 1.1处理原型数值 1.1.1情况1,未设置值 实体类 @Setter @Getter @ToString public class Info { private int age; } 测试代码 @Test public void testString() throw 阅读全文
posted @ 2022-10-15 11:20 Yorkey 阅读(75) 评论(0) 推荐(0)
摘要: 用实体类接收 测试实体类 public class TestEntity { private String name; private Integer age; // getter setter toString } Controller代码 @PostMapping("/testSend") pu 阅读全文
posted @ 2022-09-28 21:00 Yorkey 阅读(147) 评论(0) 推荐(0)
摘要: @Transactional注解测试 情况1 @Transactional public void A() { B(); } public void B() { // 具体的业务操作,如插入 // 如果此处有RuntimeException将会回滚 } 说明:A方法上有@Transactional注 阅读全文
posted @ 2022-01-21 14:52 Yorkey 阅读(227) 评论(0) 推荐(0)