Results 1 to 3 of 3

Thread: Apply a WebBindingInitializer for some controller

  1. #1

    Default Apply a WebBindingInitializer for some controller

    The petclinic sample in the 2.5.x version shows how to apply a WebBindingInitializer for all controllers with the @Controller annotation. How to applying a specific PropertyEditors for request parameter binding for some controllers but not all with the @Controller annotation?

    Thanks in advance for your inputs.
    [URL="http://vicina.info"] 新闻,社区新闻,分类广告

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    In those @Controllers create a method annotated with @InitBinder (chapter 13 of the reference guide explains this).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3

    Default

    Quote Originally Posted by Marten Deinum View Post
    In those @Controllers create a method annotated with @InitBinder (chapter 13 of the reference guide explains this).
    I know that @InitBinder can be defined in a controller class. My thought was to configure in a single place and apply to several classes. If the approach is not doable, an abstract controller class with @InitBinder defined is a solution then.
    [URL="http://vicina.info"] 新闻,社区新闻,分类广告

Posting Permissions

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