SPRING CORE / NOTES</>↗Spring Core09 May 2012
Beside injecting a simple value (using the value attribute) and a reference to other bean (using the ref attribute). We can also inject collections properties into a bean. Spring provides four ways to inject collections. There are <list> and <set> that can be used to inject arrays or any implementation of java.util.Collection. The <map> that […]
SPRING CORE / NOTES</>↗Spring Core08 May 2012
Beside using the <property> element, Spring framework also provide us another way to wiring value or reference into the bean. We can use the Spring’s p namespaces. The p namespace has a schema URI of `http://www.springframework.org/schema/p`. With this namespace declared in the Spring configuration file you can use the p: prefixed attribute of the <bean> […]
SPRING CORE / NOTES</>↗Spring Core07 May 2012
Inner bean is a bean defined inside another bean, it can be seen as an inner class. In another word, the inner bean is a bean defined within the scope of another bean. In this case the inner bean can only be use by the outer bean. No other bean in the Spring context can […]
SPRING CORE / NOTES</>↗Spring Core01 May 2012
A bean usually have some private properties that can be accessed through a pair of accessor methods, the setters and getters. These setters, the setXXX() method can be used by Spring Framework to configure the beans. This method of injecting beans property through their setter methods is called the setter injection. The following example will […]
MAIL / NOTES</>↗Mail25 Apr 2012
The following example show you how to send email using Gmail SMTP via TLS connection. The username and password is used to authenticate you against the Gmail. The configuration / properties used for connection to the Gmail SMTP is defined in the createConfiguration() method. The properties include information such as the SMTP host address, port […]
MAIL / NOTES</>↗Mail25 Apr 2012
In another example you’ve seen how to send email using Gmail SMTP via TLS. See the following example How do I send email using Gmail via TLS?. In this example you will use the SSL connection to connect to Gmail SMTP server. The difference with this is in the properties / configuration that we used […]