随笔分类 -  Spring

摘要:@OneToMany(cascade={CascadeType.REFRESH,CascadeType.REMOVE},mappedBy="parent",fetch=FetchType.EAGER)private Set childTypes = new HashSet();这个是懒加载异常,就是... 阅读全文
posted @ 2015-02-03 11:41 _启明 阅读(545) 评论(0) 推荐(0)
摘要:错误写法: cxt = new ClassPathXmlApplicationContext(); productService = (ProductService)cxt.getBean("productTypeServiceBean"); 正确写法: cxt = n... 阅读全文
posted @ 2015-02-03 11:17 _启明 阅读(7565) 评论(0) 推荐(0)
摘要:在Spring中定义了5中不同的事务隔离级别。1. ISOLATION_DEFAULT(一般情况下使用这种配置既可)这是一个PlatfromTransactionManager默认的隔离级别,使用数据库默认的事务隔离级别。2. ISOLATION_READ_UNCOMMITTED这是事务最低的隔离级... 阅读全文
posted @ 2015-01-14 09:13 _启明 阅读(7944) 评论(0) 推荐(0)
摘要:他的作用是隐式地向Spring容器注册 AutowiredAnnotationBeanPostProcessor、CommonAnnotationBeanPostProcessor、 PersistenceAnnotationBeanPostProcessor、 RequiredAnnotation... 阅读全文
posted @ 2015-01-12 20:38 _启明 阅读(246) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2015-01-06 21:06 _启明 阅读(155) 评论(0) 推荐(0)