您的位置:首页 > 编程语言 > Java开发

用Spring Tool Suite简化你的开发

2017-02-28 15:39 337 查看
Spring Tool suit   下载地址:http://spring.io/tools

如果你是一个喜欢用spring的人,你可能会在欣赏spring的强大功能外,对其各样的配置比较郁闷,尤其是相差较大的版本在配置文件方面会存在差异,当然你可以去花不少的时间去网上查找相关的资料,当你准备使用更高版本spring的时候,但这无异会让人感觉烦恼。spring其实也早就意识到了这一点,并针对此给出了很好的解决方法,那就是在基于Eclipse的基础上,spring提供了针对Spring开发的Spring Tool Suite集成开发工具,通过该工具,可以很轻易地生成一个spring的工程,比如web工程,最令人兴奋的是工程里的配置文件都会自动为你生成,你再也不用操心配置文件的格式及各种配置文件了。

Spring Tool Suite的官方下载地址是:

http://www.springsource.org/downloads/sts-ggts

根据自己的操作系统可以选择下载安装版及发布版,我选择的是发布版spring-tool-suite-3.1.0.RELEASE-e4.2-win32.zip。下载后解压即可,在目录springsource\sts-3.1.0.RELEASE的下面STS.exe就是Spring Tool Suite,双击打开,你会发现它其实与Eclipse是一样的,所不同的就是多了一些spring方面的定制。

下面以创建一个Spring Web工程为例来说明。

选择菜单File->New->Project…,在弹出的窗口中选中Spring Template Project,如图:





 

进行下一步,如图:





选择Spring MVC Project,如果是第一次创建可能会自动下载相关的包或模板,不用理会,如下图:





输入工程名如springMVC,然后输入如上图所示顶级包名,点Finish结束。

这样就创建了一个spring web工程,如下图:





看到一些熟悉的配置文件及jsp、java类了吧,这是一个基本的spring web工程所应该全部具有的,而这些你现在都不用再自己花费时间去创建并配置了。

不过应当要注意的是该工程是一个maven结构,这需要你对maven有所了解才行。

在发布你的web工程时,Spring Tool Suite也已经为你想得非常周到了!在生成的pom.xml中,可以看到有如下几行:

<groupId>com.zihou</groupId>

<artifactId>springTest</artifactId>

<name>springMVC</name>

<packaging>war</packaging>

<version>1.0.0-BUILD-SNAPSHOT</version>

运行maven的打包命令后,会在target目录下生成一个springTest-1.0.0-BUILD-SNAPSHOT.war的文件,就是你想要来进行部署的文件了!

是不是相当的方便? :-)

Eric Lindros Players from the Philadelphia Flyers and the New Jersey Devils scuffle in the background as Flyers Eric Lindros (88) lies on the ice after getting hit in the first period of Game 7 of the Eastern Conference finals in Cheap
JerseysPhiladelphia, May 26, 2000. While the NHL Players’ Association has pitched a ban of all hits to the head, the league hadn’t moved to adopt such a rule. But for the first time, change appears possible. His story isn’t unique, and as more research
is done, the danger of concussions and their long term effects become wholesale Jerseysincreasingly
clear. Concussions plagued the careers of Hall of Famer Pat LaFontaine, Eric Lindros and his brother Brett, star goalie Mike Richter, defenseman Jeff Beukeboom and countless others.Congress will once again turn its attention to concussions Friday morning,
when the House Energy Commerce Committee holds a hearing on the effects of concussions in youth sports. hockey team that pulled off the sport’s most iconic upset the “Miracle on Ice” victory over the Soviet Union at the 1980 Olympics wants to http://www.ray-banbaratas.topknow
why federal lawmakers haven’t paid attention to the plight of former professional hockey players who are dealing with the debilitating effects of the head injuries.And if you had any doubt that Korea as a nation takes Replica
Oakleys Sunglasses sale this seriously, note that the Korean Air Force actually started their own wholesale
football jerseys gaming team so that top players wouldn’t have to stop playing when the joined the military for their compulsory two year service. The team doesn’t usually do very well in the leagues since most of the players are ancient greybeards at
an average age of 27, but I bet they’d still kick most non wholesale china jerseys Korean asses.Post
traumatic encephalopathy was about the only remaining diagnosis I had in mind while I performed the autopsy and considered the case. Based on what I knew about Webster’s career and his post football behavior, I expected to see the residual damages of recurrent
contusions and necrosis (death of body tissue), and even atrophy of a lobe in his brain, which would be characteristic of post traumatic encephalopathy.You may have heard about rubbing ice cubes on your wrist to reduce recovery time. However, this method is
inefficient because low temperatures cause the blood vessels to constrict, thereby reducing the wholesale
nfl jerseys blood flow. The CoreControl applies a similar concept, however, is more effective because it uses a vacuum to draw the blood quickly to the palms, and the controlled temperature prevents constriction of blood vessels.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Spring Tool Stuit