Results 1 to 3 of 3

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

  1. #1
    Join Date
    Aug 2010
    Posts
    7

    Default 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. #2
    Join Date
    Dec 2010
    Location
    Singapore
    Posts
    285

    Default

    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>
    Amila Domingo

  3. #3
    Join Date
    Jan 2011
    Posts
    1

    Default 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.

Posting Permissions

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