Hi everyone, long time no see. Today I will show you how to create a spring mvc project in STS, it is very simple!
Open your STS, if you haven’t got it, please visit:http://www.springsource.org/sts to download. Now you got such as follows:
It’s a nice and clean work space, and starts quickly. Let’s see how to create a spring mvc project. Right click the white space in the package explorer. Select New then Other…, in the popup menu.
In the New dialog, open Spring folder and select Spring template project. Click next.
In this process, select Spring MVC Project. Click Next.
It will promote spring mvc project requires download some stuff, click Yes, then click Next.
Type your project name and the top level package name, click Finish.
Now you will have the following file structure. A HomeController, home.jsp file, and two spring configuration files, root-context.xml and servlet-context.xml. You can check the source code, they are very basic. Now you could develop your spring mvc project out of box.
Is it very simple? Yes, it saves us plenty of time to write configuration files, and maintain dependencies. You should notice that this wizard will finally create a maven project, so if you are unfamiliar with maven, please visit http://maven.apache.org/ for details. Thank you very much!