Announcement Announcement Module
Collapse
No announcement yet.
Bean class Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bean class

    Hello.
    I have a service TestService (interface) and an adapter TestServiceAdapter (dummy implementation).
    In the xml file I declare my bean as :
    <bean id="testService" class="com.test.TestServiceAdapter"/>

    Is there a posibility to specify the bean class inside a property file and specify that property on the class attribute?

    Thanks,
    Mike

  • #2
    As far as I know, this is not possible (if it is, it would be a rather new feature).

    Regards,
    Andreas

    Comment


    • #3
      You may use AOP and a TargetSource to switch between two implementations. I don't know enough about TargetSources to give you an example, take a look at http://www.springframework.org/docs/...p-targetsource

      Comment

      Working...
      X