随笔分类 -  后端开发

摘要:ByAlexis SeigneurinonSeptember 17, 2009 9:40 AM|No CommentsYesterday, I came accross a weird error when working with a Spring-enabled application. It was working fine within Eclipe but wouldn't run on the command line:Exception in thread "main" org.springframework.beans.factory.parsing 阅读全文
posted @ 2013-08-12 19:16 CY. 阅读(803) 评论(0) 推荐(0)
摘要:Paging is the term to describe getting a sub selection of data from a record set. Imagine you have a list of 1000 records but you don’t want your user to have to deal with 1000 all at the same time so you break it up into pages. You set a system limit and say they can only have 50 or 100 at a time a 阅读全文
posted @ 2013-07-19 09:50 CY. 阅读(352) 评论(0) 推荐(0)
摘要:Spring不但支持自己定义的@Autowired注解,还支持几个由JSR-250规范定义的注解,它们分别是@Resource、@PostConstruct以及@PreDestroy。 @Resource的作用相当于@Autowired,只不过@Autowired按byType自动注入,而@Resource默认按 byName自动注入罢了。@Resource有两个属性是比较重要的,分是name和type,Spring将@Resource注解的name属性解析为bean的名字,而type属性则解析为bean的类型。所以如果使用name属性,则使用byName的自动注入策略,而使用type属性时. 阅读全文
posted @ 2013-07-16 16:58 CY. 阅读(176) 评论(0) 推荐(0)