Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature that allows you to use SpEL in @NamePattern of entity #1061

Open
wants to merge 1 commit into
base: release_6_10
Choose a base branch
from

Conversation

rushan-zagidullin
Copy link
Contributor

One more convinient way to specify NamePattern. Using SpEL allows you to invoke bean methods like a charm.

The expression language supports the following functionality:

Literal expressions
Boolean and relational operators
Regular expressions
Class expressions
Accessing properties, arrays, lists, maps
Method invocation
Relational operators
Assignment
Calling constructors
Bean references
Array construction
Inline lists
Inline maps
Ternary operator
Variables
User defined functions
Collection projection
Collection selection
Templated expressions

More information: https://docs.spring.io/spring/docs/4.3.14.RELEASE/spring-framework-reference/html/expressions.html

@jreznot
Copy link
Contributor

jreznot commented Jul 17, 2018

Relates to #306

@jreznot jreznot requested review from jreznot and knstvk July 17, 2018 10:21
@jreznot
Copy link
Contributor

jreznot commented Jul 17, 2018

What are the implications of this expression engine for application performance?

@jreznot
Copy link
Contributor

jreznot commented Jul 17, 2018

It would be better if we introduce separate annotation attribute instead of the String format

@rushan-zagidullin
Copy link
Contributor Author

About performance:
"In an example micro benchmark run of 50000 iterations, it was taking 75ms to evaluate using only the interpreter"
https://docs.spring.io/spring/docs/4.2.x/spring-framework-reference/html/expressions.html#expressions-spel-compilation

@rushan-zagidullin
Copy link
Contributor Author

I also think that a separate attribute will be better. But there is a question about what to do with the list of minimal view attributes

@knstvk
Copy link
Member

knstvk commented Jul 18, 2018

What about SpEL compilation? Could we have it depending on some app property?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants