MyEclipse+Eclipse添加ibatis DTD文件实现xml的自动提示功能

来源:互联网 发布:装潢艺术设计软件技能 编辑:程序博客网 时间:2024/05/02 10:02

如图一所示:配置sql-map-2.dtd的自动提示:

附上自己写的代码:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" 
    "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap>
<resultMap id="StudentResult" class="Student">
<result property="id" column="id"/>
<result property="name" column="name"/>
</resultMap>

</sqlMap>

>>>>>>>>>>>>>>>>>>>>>---------------------------------------------------------------------------------------->>>>>>>>>>>>>>>>>>>>>>>>

如图2所示:配置sql-map-config-2.dtd的自动提示:


附上自己的源码:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<sqlMap resource="Student.xml" />
</sqlMapConfig>


如有什么不理解的希望留言。

原创粉丝点击