《Spring in Action(中文版)》读后感精选10篇
《Spring in Action(中文版)》是一本由[美] Craig Walls / Ryan Breidenba著作,人民邮电出版社出版的483图书,本书定价:59.00元,页数:2008-10,文章吧小编精心整理的一些读者的读后感,希望对大家能有帮助。
《Spring in Action(中文版)》读后感(一):Spring:面向切面编程
当初面试完,问考官,在进入公司之前需要准备些什么。他给我推荐了spring。
在学校的时候,对于公司中使用的技术非常陌生,spring 让我对这些东西有了一点点模糊的认知。
编程的发展,许多时候是体现在对于问题的不断了解,然后不断减少重复劳动,提升效率。比如对于一个企业的工程,我们有哪些共同的功能?怎么避免重复实现这些共同的功能?这就是spring要解决的问题。
ring的解决思路是什么呢?面向切面编程。程序运行本质上还是顺序的,所有的代码编译成了字节码之后,都是有一定顺序的。面向切面就是把一些事务性的功能代码抽出来,在其他地方统一实现,实际的业务开发人员只需要关注业务代码。具体使用到的所谓依赖注入,本质上就是annocation,就是给代码添加注释,然后spring框架会在不同阶段,识别出不同的注释,进行相应的行为。
具体细节可以深入到这段源码里面去。
```
@Override
ublic void refresh() throws BeansException, IllegalStateException {
ynchronized (this.startupShutdownMonitor) {
// Prepare this context for refreshing.
repareRefresh();
// Tell the subclass to refresh the internal bean factory.
ConfigurableListableBeanFactory beanFactory = obtainFreshBeanFactory();
// Prepare the bean factory for use in this context.
repareBeanFactory(beanFactory);
try {
// Allows post-processing of the bean factory in context subclasses.
ostProcessBeanFactory(beanFactory);
// Invoke factory processors registered as beans in the context.
invokeBeanFactoryPostProcessors(beanFactory);
// Register bean processors that intercept bean creation.
registerBeanPostProcessors(beanFactory);
// Initialize message source for this context.
initMessageSource();
// Initialize event multicaster for this context.
initApplicationEventMulticaster();
// Initialize other special beans in specific context subclasses.
onRefresh();
// Check for listener beans and register them.
registerListeners();
// Instantiate all remaining (non-lazy-init) singletons.
finishBeanFactoryInitialization(beanFactory);
// Last step: publish corresponding event.
finishRefresh();
}
catch (BeansException ex) {
logger.warn("Exception encountered during context initialization - cancelling refresh attempt", ex);
// Destroy already created singletons to avoid dangling resources.
destroyBeans();
// Reset 'active' flag.
cancelRefresh(ex);
// Propagate exception to caller.
throw ex;
}
}
}
```
另外,想要用好spring,可能还需要一些xml相关知识,因为spring的功能是通过xml配置的。spring的官网喜欢给出各种样例工程,便于快速实践。
《Spring in Action(中文版)》读后感(二):翻译差点可以忍 出版社编辑太垃圾了
我就纳闷了 都第六次印刷了 先不说翻译的问题
刚刚翻到36页 就看到了3处 错别字和拼写错误 能不能改正下啊
出版社能不能端正下态度啊 这么好的一本书 就这么让翻译和出版社毁了
真是无语了!
我看过不少人民邮电出版社出的书 都是这样
其实错别字还好 这种代码书就怕后面的关键样例代码少东西和拼写错误
你这不是误人子弟吗?!
如果真像大家评论的那样后面的错别字一大把,就真的悲剧了。
如果对自己E文有信心的话 直接买300米的原版书吧
省得遭罪 这一边看 还要一边对着别人做的勘误表 坑爹啊
书是好书 就这么让出版社毁了
《Spring in Action(中文版)》读后感(三):生氣
第一次看翻譯書看到那麼生氣。
原書第61頁、中文版第40頁中,
Therefore, Spring will use that constructor, passing in the sonnet29 bean, when constructing the duke bean, as expressed in figure 2.6.
被翻成:
因此,在構造duke Bean時,Spring使用這個構造函數,傳遞到sonnet29 Bean中,如圖2.6所示。
明明原文是說Spring把sonnet29這個bean傳進duke的constructor。
另外中文版第24頁的圖文說明也有誤。
直接看原文書吧,