/spring-mvc-archetype

An extremely simple Spring MVC archetype

Primary LanguageJava

Maven Central

spring-mvc-archetype

An extremely simple Spring MVC, configured with annotations.

This archetype is a fork of co.ntier:spring-mvc-archetype:1.0.2. Its goal, as the origin, is to provide a simple archetype to start a Spring MVC based project. Compared to co.ntier:spring-mvc-archetype:1.0.2, it uses a more recent version of Spring, explicitly adds a dependency to an application server (jetty), uses Theamleaf as template engine, and includes an example integration test.

creating a project

Either use your favorite IDE or use the command line:

mvn archetype:generate \
  -DgroupId=test \
  -DartifactId=test \
  -DarchetypeGroupId=fr.uha.ensisa.ff \
  -DarchetypeArtifactId=spring-mvc-archetype \
  -DarchetypeVersion=1.0.10 \
  -DinteractiveMode=false

checking generated project

To check project, cd into the created project (test in the above example) and run mvn verify. You can see the web interface by running mvn jetty:run and load http://localhost:8080/hello.