Circus Raju

Posted Leave a commentPosted in Uncategorized

Circus Raju Raju performs various Circus feats in his show. One of them is Magic Bar balancing act (Magic bar, assume it as a long rod). In this feat, he tries to balance the magic bar by placing different weights at equal distances. Balancing point need not be the center of the Bar. He can […]

BEAN INITIALIZATION AND DESTRUCTION USING ANNOTATIONS IN SPRING

Posted Leave a commentPosted in Uncategorized

Spring provides options to call methods before bean construction and before destruction.Spring provides “initMethod” and “destroyMethod” attributes which we can apply in @Bean annotation if you have used java based configuration to create beans. And if you have defined your beans outside a Java config class (e.g., with the @Component annotation), then you have to use […]

Read properties file in spring using annotation

Posted Leave a commentPosted in Uncategorized

Spring provides @PropertySource(“path of property file”) annotation and Environment class using which you can easily read the property file. Let’s read the values below property file using this annotation and Environment class and add use those in our spring application and understand how to use as well as where to place these annotations. details.properties basic=basicPhone smart=smartPhone Phone.java […]

Autowiring using annotations in spring

Posted Leave a commentPosted in Uncategorized

It’s a feature of spring framework by which spring automatically injects one dependency into the another dependency or in a more formal way we can say implicitly wires the two dependencies.BENEFITS/NO Spring provides @Autowired annotation to achieve autowiring among beans. Let’s understand the above description of autowiring through a simple example by comparing an example of […]