How do you create a Spring MVC project in Eclipse?

后端 未结 5 535
孤城傲影
孤城傲影 2020-12-12 13:33

I am trying to follow the basic tutorial for Spring MVC but got lost at creating a new project in Eclipse.
It seems to me that most tutorials assume you know how to crea

5条回答
  •  悲哀的现实
    2020-12-12 14:29

    You don't necessarily have to create a Spring project. Almost all Java web applications have he same project structure. In almost every project I create, I automatically add these source folder:

    • src/main/java
    • src/main/resources
    • src/test/java
    • src/test/resources
    • src/main/webapp*

    src/main/webapp isn't actually a source folder. The web.xml file under src/main/webapp/WEB-INF will allow you to run your java application on any Java enabled web server (Tomcat, Jetty, etc.). I typically add the Jetty Plugin to my POM (assuming you use Maven), and launch the web app in development using mvn clean jetty:run.

提交回复
热议问题