开发者

Is there a maven 2 archetype for spring 3 MVC applications?

开发者 https://www.devze.com 2022-12-28 18:17 出处:网络
I\'m experimenting with the spring 3 MVC framework. Since i use maven 2 to manage my project, i\'m searching for a arc开发者_开发百科hetype to create a spring 3 MVC application. You can use STS (sprin

I'm experimenting with the spring 3 MVC framework. Since i use maven 2 to manage my project, i'm searching for a arc开发者_开发百科hetype to create a spring 3 MVC application.


You can use STS (spring tool suite) a new spring MVC template project creates a working application using spring 3.

Or you can using Spring Roo to give a working foundation to your project.


I also couldn't find useful archetypes, so I have created my own. You can find it here. If you find anything you'd like to add, please don't hesitate to mail me or send a patch


Spring MVC quickstart archetype is available on GitHub, courtesy of kolorobot. Good instructions are provided on how to install it to your local Maven repo and use it to create a new Spring MVC project. He’s even helpfully included the Tomcat 7 Maven plugin in the archetypical project so that the newly created Spring MVC can be run from the command line without having to manually deploy it to an application server.

Kolorobot’s example application includes the following:

  • No-xml Spring MVC 3.2 web application for Servlet 3.0 environment
  • Apache Tiles with configuration in place,
  • Bootstrap
  • JPA 2.0 (Hibernate/HSQLDB)
  • JUnit/Mockito
  • Spring Security 3.1


AppFuse and AppFuse Light have been upgraded to use Spring 3 so I guess you could use one of the appfuse archetypes.

But what is exactly a Spring MVC application if not a regular webapp with some dependencies on Spring 3 artefacts?


From the springsource forum:

In Spring Source Tool Suite.

Go to New -> Other -> Spring Source Tool Suite -> Spring Template Project -> Spring MVC Project

enter the details and click Finish.


The Codehaus Maven User Archetypes List has several archetypes including two from app-fuse that use Spring MVC.


This archetype creates a Java web application that uses Spring MVC framework, Angular and Event Sourcing.

mvn archetype:generate \
 -DarchetypeGroupId=no.bouvet \
 -DarchetypeArtifactId=maven-archetype-eventsourcing \
 -DarchetypeVersion=1.0.2 \
 -DgroupId=com.domain.myapp \
 -DartifactId=myapp

You can find the source here - maven-archetype-eventsourcing

And read the blogg - Get your Event Sourced web application development started with one line using Maven!


A friend and I created this spring boiler plate for SPA applications. Could perhaps be useful to you https://github.com/PabloK/SpringRESTboilerplate


What I do is create a new Spring Project and one of the selections available in STS Simple Spring Web Maven; it sets up a Spring 3 Maven webapp, just modify the pom to Spring 4 and do a clean install from the Run Config.


As far as i know it does not exist. But why didn't create your own?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号