感谢ITCAST发布的免费视频。

 

public class PersonServiceBean implements PersonService {

       private PersonDao personDao;

       private String name;

      

       public void save() {

             

       }

 

       public PersonServiceBean(PersonDao personDao, String name) {

              super();

              this.personDao = personDao;

              this.name = name;

       }

      

}

 

配置文件:

    <bean id="personService" class="service.impl.PersonServiceBean" init-method="init" destroy-method="destory">      

       <constructor-arg index="0" type="PersonDao" ref="personDao">

       </constructor-arg>

       <constructor-arg index="1" type="java.lang.String" value="str">

       </constructor-arg>      

    </bean>

相关文章:

  • 2021-09-10
  • 2021-09-04
  • 2021-07-08
  • 2022-01-02
  • 2022-01-29
  • 2021-11-13
  • 2021-05-18
  • 2021-07-17
猜你喜欢
  • 2021-07-12
  • 2022-03-03
  • 2022-02-11
  • 2021-11-20
  • 2021-09-10
  • 2021-08-17
  • 2021-10-10
相关资源
相似解决方案