spring-tool-suite使用教程,并创建spring配置文件

本文为博主原创,未经允许不得转载:

       在应用springMVC框架的时候,每次创建spring的xml配置文件时,需要很多步骤,非常麻烦。

所以spring提供了spring-tool-suite插件,可以快速创建spring项目,以及配置文件,很方便快捷。

       spring-tool-suite工具套件是一个基于Eclipse的开发环境,用于开发Spring应用程序。

它提供了一个现成的使用环境来实现,调试,运行,和部署你的Spring应用程序。

    第一步在eclipse中安装此插件:

        步骤一:

          Help->Eclicpse Marketplace

     步骤二:搜索 spring-tool-suite

Installed 安装……(一路confirm以及yes即可)

     步骤三:查看是否安装成功:

Window->Preferences    之后出现Spring选项说明已经安装成功。

 

步骤四:配置*.xml默认打开方式

打开Eclipse-->偏好设置,如下图:

找到File Associations,在File types中找到*.xml项,如果没有就点击Add来添加,选中*.xml然后在Associated editors中选中Spring Config Editor点击右边的Default就可以了

如果不想默认用Spring Config Editor打开xml文件可以不用配置这里,右键点击xml文件也可选择用Spring Config Editor来打开。

第二步:新建spring的xml配置文件

    File---new ---other,然后输入spring,选中spring Bean Configuration File

 

填写xml文件名称

 

 

选中spring约束类型

然后finish即可完成,spring配置文件。

新建文件如图:

大功告成!!!

 

posted @ 2018-03-20 20:27  香吧香  阅读(42439)  评论(0编辑  收藏  举报