Top "Spring-el" questions

The Spring Expression Language (SpEL for short) is a powerful expression language that supports querying and manipulating an object graph at runtime.

Concatenate multiple node values in xpath

I have a XML that looks like this <element1> <element2> <element3> <element4>…

xml xslt xpath xquery spring-el
Thymeleaf using path variables to th:href

Here's my code, where I'm iterating through: <tr th:each="category : ${categories}"> <td th:text="${category.idCategory}"&…

java spring spring-mvc spring-boot spring-el
How to fill HashMap from java property file with Spring @Value

Is it possible to use Spring @Value, to map values from properties file to the HashMap. Currently I have something …

java spring properties-file spring-el
Thymeleaf: show text if the attribute and property exists

Is there a simple way in thymeleaf to show the content of an attribute property if the property and the …

spring thymeleaf spring-el
How does Spring 3 expression language interact with property placeholders?

Spring 3 has introduced a new expression language (SpEL) which can be used in bean definitions. The syntax itself is fairly …

java spring spring-el
How do I get a property value from an ApplicationContext object? (not using an annotation)

If I have: @Autowired private ApplicationContext ctx; I can get beans and resources by using one of the the getBean …

spring spring-el
Spring Expression Language (SpEL) with @Value: dollar vs. hash ($ vs. #)

I'm a little confused concerning when to use ${...} compared to #{...}. Spring's documentation only uses #{...}, but there are plenty of examples …

spring dependency-injection spring-el
How to replace a placeholder in a String with a SimpleDateFormat Pattern

In a given String like this ".../uploads/${customer}/${dateTime('yyyyMMdd')}/report.pdf" I need to replace a customer and a …

java apache-commons spring-el
Field or property cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext

The following bean definition: <bean id="client" factory-bean="builder" factory-method="withConfiguration"> <constructor-arg type="java.lang.String" value="#{ ${…

java spring spring-el
Spring @Value TypeMismatchException:Failed to convert value of type 'java.lang.String' to required type 'java.lang.Double'

I want to use the @Value annotation to inject a Double property such as: @Service public class MyService { @Value("${item.…

java spring spring-el spring-properties property-placeholder