1、创建object.xml文件

2、写入xml文件的代码:

<?xml version="1.0" encoding="utf-8" ?>

<objects xmlns="http://www.springframework.net"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.net
        http://www.springframework.net/xsd/spring-objects.xsd">

    <object name="PersonDao" type="TSpring.MyDao.PersonDao, TSpring.MyDao">
    </object>

</objects>

*****3、将object.xml文件属性“生成操作”设置为:嵌入的资源

第三步非常重要,如果不变更文件的属性,会在运行时报错:Error creating context 'spring.root'

相关文章:

  • 2022-12-23
  • 2022-02-18
  • 2022-02-07
  • 2021-10-21
  • 2021-09-19
  • 2022-02-12
  • 2022-02-03
  • 2021-07-31
猜你喜欢
  • 2022-02-22
  • 2022-12-23
  • 2021-12-20
  • 2021-11-04
  • 2021-12-19
相关资源
相似解决方案