I'm working on a project in which I need to pass parameters to the @subselect annotation of spring boot (which maps a request to an entity), like the following example:
@Entity
@Immutable
@Subselect("SELECT FROM Employe INNER JOIN Employe_adress ON Employe.id = Employe_adress.eid WHERE Employe_adress.aid=?x")
public class Employe {
...
}
I want to bind an external value to "x" variable. Thank you.
Edit: One method I find is adding a global variable, but "The value for annotation attribute must be a constant expression".