zl程序教程

您现在的位置是:首页 >  其他

当前栏目

为eclipse离线安装hibernate tools插件

2023-09-14 08:57:45 时间

工具/原料

 
  • eclipse luna
  • jboss hibernate tools

方法/步骤

 
  1.  

    下载hibernate tools插件

    为eclipse离线安装hibernate tools插件
    为eclipse离线安装hibernate tools插件
    为eclipse离线安装hibernate tools插件
  2.  

    在eclipse根目录下创建myplugins和links;

    然后再在myplugins下创建hibernate_tools文件夹;

    解压提取下载jboss包的features和plugins两个文件夹到hibernate_tools下,见下图;

    为eclipse离线安装hibernate tools插件
    为eclipse离线安装hibernate tools插件
    为eclipse离线安装hibernate tools插件
  3.  
    在links中文件夹中建立一个后缀名为.link的文件,内容如下图;
    为eclipse离线安装hibernate tools插件
    为eclipse离线安装hibernate tools插件
    为eclipse离线安装hibernate tools插件
  4.  

    这时我们发现编写xml文件时还不能有自动提示,我们还要手动导入dtd文件;

    为eclipse离线安装hibernate tools插件
    为eclipse离线安装hibernate tools插件
  5.  

    dtd文件链接对应xml文件中的头行链接;路径如下图;注意看红框

    为eclipse离线安装hibernate tools插件
    为eclipse离线安装hibernate tools插件
    END

注意事项

 
  • link文件中路径可以是绝对的也可以是相对的;
  • 这种方式安装在hibernate_tools4版本下会不能自动建立.hbm.xml文件,不过已经在最后一步骤给出了xml文件内容,我们只要复制就好