Results 1 to 2 of 2

Thread: BeanNameAutoProxyCreator: beanNames

Hybrid View

  1. #1
    Join Date
    Aug 2004
    Posts
    107

    Default BeanNameAutoProxyCreator: beanNames

    It would be nice that the beanNames properties would strip out white space so it would be easier to specify the names in a readable matter. Eg

    Instead of this:

    <bean id="serviceProxyCreator" class="org.springframework.aop.framework.autoproxy .BeanNameAutoProxyCreator">
    <property name="beanNames">
    <value>com.toto.pk.service1,com.toto.pk.service2,c om.toto.pk.service3,com.toto.pk.service4</value>
    </property>
    <property name="interceptorNames">
    <list>
    <value>debugInterceptor</value>
    </list>
    </property>
    </bean>

    Have this:

    <bean id="serviceProxyCreator" class="org.springframework.aop.framework.autoproxy .BeanNameAutoProxyCreator">
    <property name="beanNames">
    <value>
    com.toto.pk.service1,
    com.toto.pk.service2,
    com.toto.pk.service3,
    com.toto.pk.service4
    </value>
    </property>
    <property name="interceptorNames">
    <list>
    <value>debugInterceptor</value>
    </list>
    </property>
    </bean>

  2. #2
    Join Date
    Aug 2004
    Location
    Montréal, Canada
    Posts
    845

    Default

    You can do it this way
    Code:
    <bean id="serviceProxyCreator"
          class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"> 
     <property name="beanNames"> 
      <list>
       <value>com.toto.pk.service1</value>
       <value>com.toto.pk.service2</value>
       <value>com.toto.pk.service3</value>
       <value>com.toto.pk.service4</value>
      </list> 
     </property> 
     <property name="interceptorNames"> 
      <list> 
       <value>debugInterceptor</value> 
      </list> 
     </property> 
    </bean>
    I think it is more readable now.
    Omar Irbouh

    Spring Modules Team
    http://irbouh.blogspot.com/

Posting Permissions

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