摘要:
int i = 42;String s = (i50)?"bbb":"ccc";System.out.println(i);结果:ccc 相当于String s = (i50)?"bbb":"ccc" ); 或者:String s;if(i50){ s = "bbb";}else(i<40){ s = "ccc";}View Code 阅读全文
摘要:
throw new RuntimeException("====");会回滚throw new Exception("====");不会回滚回滚@Transactional(rollbackFor=Exception.class) public void aa() { throw new Exception("==="); }不回滚@Transactional(noRollbackFor=Exception.class) public void bb() { throw new RuntimeException("====& 阅读全文