Announcement Announcement Module
Collapse
No announcement yet.
Service autowiring in SWF Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Service autowiring in SWF

    Instead of associating scope variable with an implementing class, is it possible to mention the interface for that particular class and spring autowire the service implementation just like in mvc?
    I tried simply by placing the interface instead of the class, which didn't work .

  • #2
    Originally posted by [email protected] View Post
    Instead of associating scope variable with an implementing class, is it possible to mention the interface for that particular class and spring autowire the service implementation just like in mvc?
    I tried simply by placing the interface instead of the class, which didn't work .
    I'm using the mentioned pattern,e.g.:

    Code:
    @Autowired
    private transient IEntityServiceBusinessClass entityServiceBusinessClass;
    with the below annotation in the Service impl:

    @Service("entityServiceBusinessClass")

    In my service-config I have the below statement (but not sure if needed):

    Code:
    <context:component-scan base-package="ch.delos.it.bd.services">
          <context:include-filter type="annotation"
              expression="org.springframework.stereotype.Service"/>
    </context:component-scan>
    - Peter

    Comment

    Working...
    X