Home » Archives for Theodora Fragkouli » Page 5

Author Archives: Theodora Fragkouli

Theodora has graduated from Computer Engineering and Informatics Department in the University of Patras. She also holds a Master degree in Economics from the National and Technical University of Athens. During her studies she has been involved with a large number of projects ranging from programming and software engineering to telecommunications, hardware design and analysis. She works as a junior Software Engineer in the telecommunications sector where she is mainly involved with projects based on Java and Big Data technologies.

Spring AOP Example

With this tutorial we shall show you how to use Aspect Oriented Programming in Spring Framework. AOP is used in the Spring Framework to provide declarative enterprise services, especially as a replacement for EJB declarative services. It is also used to allow users to implement custom aspects, complementing their use of OOP with AOP. We will demonstrate how to create ...

Read More »

Spring Expression Language Example

The Spring Expression Language (SpEL for short) is a powerful expression language that supports querying and manipulating an object graph at runtime. SpEL expressions can be used with XML or annotation based configuration metadata for defining BeanDefinitions. In both cases the syntax to define the expression is of the form #{ <expression string> }. We can use SpEL to inject ...

Read More »

Spring Autowire Example

In this example we shall show you how to use Spring Autowiring features to wire beans in other beans. The Spring container can autowire relationships between collaborating beans. Spring offers the auto-wiring modes below: Auto-Wiring ‘no’ : It is the default mode that includes no autowiring. Bean references must be defined via a ref element. Changing the default setting is ...

Read More »

Spring Bean Lifecycle Example

With this tutorial we shall show you how to use Spring’s initialization and destruction methods to control a Spring Bean’s lifecycle. Sometimes, specific actions need to be performed upon a bean creation or when a bean is destroyed. Spring provides simple ways to perform actions in a bean’s lifecycle start and end. The first way provided by Spring to perform ...

Read More »

Spring Dependency Checking Example

This is an example of how to check dependencies in a Spring Bean. A Spring Bean can have dependencies of any type, such as primitive types, Collections or even Objects that are references to other beans. Sometimes it is necessary that specific dependencies have to be set, so that a Spring Bean is instantiated correctly. Spring provides developers the ability ...

Read More »

Spring Bean Configuration Inheritance Example

This is a tutorial about the Configuration Inheritance between Spring Beans. In Spring, a bean definition can contain a lot of configuration information, including constructor arguments, property values, and container-specific information such as initialization method, static factory method name, and so on. A child bean definition is able to inherit configuration data from a parent definition. The child definition can ...

Read More »

Spring PropertyPlaceholderConfigurer Example

With this tutorial we are going to demonstrate how to use the PropertyPlaceholderConfigurer. The PropertyPlaceholderConfigurer is a property resource configurer that resolves placeholders in bean property values of context definitions. It pulls values from a properties file into bean definitions. We can use it to externalize property values from a bean definition in a separate file using the standard Java ...

Read More »

Spring Inject Date into Bean property with CustomDateEditor

In this example we shall show you how to inject a Date property in a Spring Bean, using the CustomDateEditor. The CustomDateEditor is a class provided by the Spring API and is used as a Property editor for java.util.Date, supporting a custom java.text.DateFormat. In order to use CustomDateEditor for date injection in a Spring Bean property, we first have to ...

Read More »

Spring Collections (List, Set, Map and Properties) Example

With this example we shall show you how to inject Collections in Spring Beans properties. The types of Collections that are supported by Spring are List, Set, Map and Properties. In order to show how the Collections can be injected in a Spring Bean we will create a simple Spring Bean with four properties, List, Set, Map and Properties. Our ...

Read More »