Skip to content

Add support for SpEL expression in @Indexed [DATAMONGO-2112] #2978

Closed
@spring-projects-issues

Description

@spring-projects-issues

DzianisH opened DATAMONGO-2112 and commented

 Let say i have domain object like below. As developer i want to move expireAfterSeconds's value to application.properties file and replace 42 with smth like @Value("${life-universe-everything.answer}"), but it's not possible now. The only workaround is to use mongoTemplate. Please, add integration with Spring context into @Indexed annotation.

@Document
public class POJO {
    @Indexed(expireAfterSeconds=42, background = true)
    private Date creationDate = new Date();
    private String payload;
}

 


Affects: 2.0.11 (Kay SR11)

Referenced from: pull request #647

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions