摘要:
finally会被执行到 1.catch中 throw try{ int i = 1/0; }catch (Exception e) { throw e; }finally { System.out.println("finally"); } 2.catch中return try{ int i = 阅读全文
摘要:
@Resource和@Autowired注解都是用来实现依赖注入的。只是@AutoWried按by type自动注入,而@Resource默认按byName自动注入。 @Resource有两个重要属性,分别是name和type spring将name属性解析为bean的名字,而type属性则被解析为 阅读全文
