- 博客(4)
- 收藏
- 关注
原创 Spring中的@Transactional(rollbackFor = Exception.class) try catch 异常时候 会失效
在catch里加TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
2021-09-03 16:49:05
413
原创 MultipartFile file上传图片解决图片旋转
@ResponseBody @PostMapping("/fastuploads") String fastuploads(@RequestParam("file") MultipartFile file) { String url = ""; try { FtpSeting ftpSeting = serverService.selectServerParam(); String pictureByName = PfDemo.getPictureByName(file,ft...
2021-08-11 17:59:48
821
原创 两个线程、一个输出字母一个输出数字。交替输出:1A2B3C……
static Thread t1=null,t2=null; public static void main(String[] args)throws Exception { char[] aI = “1234567”.toCharArray(); char[] aC = “ABCDEFG”.toCharArray(); t1=new Thread(()->{ for (char c : aI) { System.out.println©; LockSupport.unpark(t2); LockSu
2020-05-19 08:28:50
511
原创 用两个线程,一个输出字母,一个输出数字,交替输出:1A2B3C4D5E.....26Z
static Thread t1=null,t2=null; public static void main(String[] args)throws Exception { char[] aI = "1234567".toCharArray(); char[] aC = "ABCDEFG".toCharArray(); t1=new Thread(()->{ for (char c : aI) { System.out.println(c); LockSupport.unpar
2020-05-19 08:05:44
1034
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人