Friday, March 28, 2014

Getting started with Spring Framework, Second Edition now available

Second Edition of Getting Started with Spring Framework book is now available from Amazon. The second edition contains additional material on Spring Web MVC, RESTful Web Services and Spring Security, and is based on Spring 4.

You can  download the sample code that comes with the book from the following Google code project: https://code.google.com/p/getting-started-with-spring-framework-2edition/

You can post your questions and feedback on the following Google group:  https://groups.google.com/forum/#!forum/getting-started-with-spring-framework

Paperback: http://www.amazon.com/dp/1491011912
Kindle: http://www.amazon.com/Getting-started-Spring-Framework-Edition-ebook/dp/B00JAUV4AQ

Thursday, April 11, 2013

Thursday, March 21, 2013

PDF version of Getting started with Spring Framework

If you want to buy a PDF version of Getting started with Spring Framework book, please visit the following Smashwords link: https://www.smashwords.com/books/view/271548

Wednesday, March 6, 2013

Book review at DZone

Many thanks to Ivan Kirkpatrick for taking the time to review Getting started with Spring Framework book.

Review summary
In summary this book represents a very good and practical introduction to the the Spring Framework. The examples in the text and the supporting source code are very clear and include practical advice for most real world situations. I recommend this book for those seeking a good solid and practical approach to learning the Spring Framework.


The complete review is available here: http://books.dzone.com/reviews/getting-started-spring

Monday, December 31, 2012

Bean definition inheritance

This artcle is taken from the book Getting started with Spring Framework

The following figure shows the dependencies of different application objects in an application:


The above figure shows that the PersonalBankingDao and FixedDepositDao classes are dependent on the DatabaseOperations class. If multiple beans in your application share a common set of configuration (properties, constructor arguments, and so on), you can create a bean definition that acts as a parent for other bean definitions.

The following example listing shows that the PersonalBankingDao and FixedDepositDao bean definitions make use of bean definition inheritance to specify that they are dependent on DatabaseOperations bean:

<bean id="databaseOperations" 
      class="sample.spring.chapter01.springbankapp.utils.DatabaseOperations" /> 

<bean id="daoTemplate" abstract="true"
        <property name="databaseOperations" ref="databaseOperations" /> 
</bean> 

<bean id="fixedDepositDao" parent="daoTemplate" 
      class="sample.spring.chapter01.springbankapp.dao.FixedDepositDaoImpl" /> 

<bean id="personalBankingDao" parent="daoTemplate"
        class="sample.spring.chapter01.springbankapp.dao.PersonalBankingDaoImpl" />

In the above example listing, the daoTemplate bean definition defines the common configuration shared by both the fixedDepositDao and personalBankingDao bean definitions. As both the fixedDepositDao and personalBankingDao bean definitions require the databaseOperations dependency, the daoTemplate bean definition defines the databaseOperations dependency using the <property> element. The <bean> element’s parent attribute specifies the name of the bean definition from which the configuration is inherited. As the parent attribute value is daoTemplate for fixedDepositDao and personalBankingDao bean definitions, they inherit databaseOperations property from the daoTemplate bean definition.