Announcement Announcement Module
Collapse
No announcement yet.
How specify a bean when @Autowire for DAO is NOT used? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How specify a bean when @Autowire for DAO is NOT used?

    In a Hibernate with SpringJPA I setup Spring by using the @AutoWire annotation for the DAO service implementation.

    Assume I want to avoid the @Autowire Annotation: How do I have to specify
    the bean in applicationContext.xml then?

    It must be something like:

    <bean id=myService" class="com.aaa.bbb.ccc.service.testADDImpl">
    <property name="dao" ref="myService"/>
    ....
    </bean>

    Can anybody help?

    Is there a SpringJPA specialized sub-forum?

    Peter

  • #2
    I want to avoid the @Autowire Annotation: How do I have to specify the bean in applicationContext.xml then?
    Code:
    <bean id=myService" class="com.aaa.bbb.ccc.service.testADDImpl" autowire="byType">
    </bean>

    Comment


    • #3
      container

      Small fork lift trucks or telehandlers.
      The quickest way is to lift the end away from the door but I would not recommend it.

      Comment

      Working...
      X