摘要:
1.最简单通知配置 /** * 测试AOP的配置 */ public class AOPTest { public static void main(String[] args) { //1.获取容器 ApplicationContext ac = new ClassPathXmlApplicati 阅读全文
摘要:
1.基于jdk动态代理实现方式 /** * 模拟一个消费者 */ public class Client { public static void main(String[] args) { final Producer producer = new Producer(); /** * 动态代理: 阅读全文
摘要:
1.强依赖关系 public class JdbcDemo1 { public static void main(String[] args) throws SQLException, ClassNotFoundException { //1.注册驱动 // DriverManager.regist 阅读全文
摘要:
1.基于xml的spring事务 /** * 使用Junit单元测试:测试我们的配置 */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "classpath:bean.xml") public c 阅读全文