16

In IntelliJ Idea 14, I could use the following:

File > New Project > Spring > Create project from template > Spring MVC

To create a template Spring MVC application with Maven. Is this feature somewhere else now?

The problem is, if I don't use the template, there is no webapp folder made. I check the Spring + Spring MVC + Web application when creating the project, but there is no webapp folder.

Any ideas?

Ali Dehghani
  • 46,221
  • 15
  • 164
  • 151
Kevin Van Ryckegem
  • 1,915
  • 3
  • 28
  • 55
  • You can try creating projects using Maven's archtypes. I am sure it will create a webapp folder, along with other stuff in it. Project created by Maven then be directly imported in Intellij Idea. Or is that not what you want? – We are Borg Feb 26 '16 at 11:55
  • Have you found any solution? I am using Idea 16 and it is not creating any pom.xml and files inside src. – Shihab Apr 01 '16 at 21:20
  • @BigGuy Unfortunately, I still haven't found a solution to this. The only thing that I found to solve this is to install Idea 14, create the project template using Idea 14, then open it with Idea 15+. That's what I'm doing. – Kevin Van Ryckegem Apr 01 '16 at 21:22
  • @KevinVanRyckegem Oh. That's terrible. Thanks for the information. I will let you know if I find something. – Shihab Apr 01 '16 at 21:23
  • @Kevin Van Ryckegem Have you found a solution? – Vladimir Glinskikh Feb 27 '17 at 08:54
  • Unfortunately I haven't found any other solution than the ones stated. – Kevin Van Ryckegem Feb 27 '17 at 09:05

4 Answers4

1

The closest replacement for that in IntelliJ 15 that I've found is to use Spring Initalizr, which will create you a Spring Boot project, that includes Spring MVC.

IntelliJ 15 Spring Initializr

Alexey Soshin
  • 16,718
  • 2
  • 31
  • 40
  • But if I remember well (correct me if I'm wrong), by doing that, you wouldn't get the same structure as in IntelliJ 14. There is no webapp folder etc. – Kevin Van Ryckegem Feb 28 '16 at 17:41
0

You need to choose a maven archetype. Go to File > New Project > Maven, check "Create from archetype" and choose needed archetype from the list.

Anton Antonenko
  • 121
  • 1
  • 4
0

I guess you are using IDEA Community Edition. As far as I remember starting from IDEA 2015 the out-of-the-box support for Spring (along with a few other frameworks) has become exclusive to the IDEA Ultimate Edition. Excerpt from the Intellij IDEA editions comparison matrix:

enter image description here

As a workaround I'd suggest using a scaffolding tools mentioned in other answers.

jannis
  • 4,843
  • 1
  • 23
  • 53
-1

I got the solution. I had the same question when I was using IDEA 16. So I googled and found the answer, on the idea help site.

If you can't open the link, reference the copy content.

  • On the first, Project Category and Options page of the Wizard: In the left-hand pane, select Java Enterprise.
  • From the Project SDK list, select the JDK to use. In our example, it is 1.8.
  • From the Application Server drop-down list, choose GlassFish 4.1.1.
  • From the JavaEE Version drop down list, choose JavaEE 7.
  • In the Additional Libraries and Frameworks area, select the Web Application check box.
  • Choose the Download option in the area below the Additional Libraries and Frameworks list. The area is displayed only after you have selected the Web Application and RESTful Web Service check boxes.
  • Click Next.
  • parakmiakos
    • 2,994
    • 9
    • 29
    • 43
    Eric4h
    • 1