摘要: /** * spring的配置类,相当于bean.xml */@Configuration//@Configuration标注在类上,相当于把该类作为spring的xml配置文件中的<beans>// 作用为:配置spring容器(应用上下文)@ComponentScan("com.zxh")//需 阅读全文
posted @ 2020-03-31 19:59 sasuke。 阅读(724) 评论(0) 推荐(0) 编辑
摘要: 内部bean 对象结构: @Autowiredprivate IAccountService accountService; @Service("accountService")@Transactional(propagation= Propagation.SUPPORTS,readOnly=tru 阅读全文
posted @ 2020-03-31 19:47 sasuke。 阅读(375) 评论(0) 推荐(0) 编辑
摘要: 一个持久层接口 public interface IAccountDao { /** * 根据Id查询账户 * @param accountId * @return */ Account findAccountById(Integer accountId); /** * 根据名称查询账户 * @pa 阅读全文
posted @ 2020-03-31 01:25 sasuke。 阅读(138) 评论(0) 推荐(0) 编辑