Results 1 to 2 of 2

Thread: Controlling Annotation Parameter

  1. #1
    Join Date
    Oct 2007
    Posts
    26

    Default Controlling Annotation Parameter

    class Bean
    {
    @Length(max=5)
    String value;
    }

    Is there a way to inject a max value from spring context? Ie. I'd like to avoid hard coding max=5. This is useful in case of library development and such.

    Thanks,

  2. #2
    Join Date
    May 2007
    Location
    Saint Petersburg, Russian Federation
    Posts
    1,189

    Default

    You can create you own BeanPostProcessor that is able to process your custom annotation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •