java custom annotation: send id by dynamically

Am newbie to spring,

I have done some research on custom annotations but am struggling below,

i wanna send id by dynamically, the method level custom annotation need to check the database and need to return a Boolean. How can i will achieve?

@Target(value={ElementType.METHOD, ElementType.FIELD})


@Constraint(validatedBy = IsCurrentFinancialYearValidator.class)

public @interface IsCurrentFinancialYear {

boolean isCusrrentFinancialYear() default true;


Am struggling sending the dynamic id from the controller and using it.

Thanks in advance...

Read More »

By: StackOverFlow - Monday, 16 April

Related Posts