In this post under Spring SpEL, I will show with example how to access list in SpEL. For our example I will create the below main class Main class 1 package spel.package4; 2 3 import org.springframework.beans.factory.annotation.Value; 4 import org.springframework.context.ApplicationContext; 5 import org.springframework.context.annotation.AnnotationConfigApplicationContext; 6 import org.springframework.context.annotation.Bean; 7 import org.springframework.context.annotation.ComponentScan; 8 import org.springframework.stereotype.Component; 9 10 import java.util.ArrayList;…… Continue reading Accessing list in SpEL
Tag: Spring SpEL
Accessing map in SpEL
In this post under Spring SpEL, I will show with example how to access map in SpEL. For our example I will create the below main class Main class 1 package spel.package3; 2 3 import org.springframework.beans.factory.annotation.Value; 4 import org.springframework.context.ApplicationContext; 5 import org.springframework.context.annotation.AnnotationConfigApplicationContext; 6 import org.springframework.context.annotation.Bean; 7 import org.springframework.context.annotation.ComponentScan; 8 import org.springframework.context.annotation.Configuration; 9 10 import java.util.HashMap;…… Continue reading Accessing map in SpEL
Accessing array in SpEL
In this post under Spring SpEL, I will show how to access array elements in SpEL expressions. For our example I will use the two beans. Below is the class structure of them Bean1 class package spel.package2; import org.springframework.stereotype.Component; @Component public class Bean1 { private int[] values = new int[] {1, 2, 3, 4}; public…… Continue reading Accessing array in SpEL
SpEL Simple example
In this post under Spring SpEL, I will give a simple example that shows how to access bean properties and use literal values in SpEL expressions. SpEL (Spring Expression Language) is an expression language that supports querying and manipulating objects at runtime. This expression language is written within “${ and “}” when used inside annotation…… Continue reading SpEL Simple example