-
Notifications
You must be signed in to change notification settings - Fork 12
fabrodev/maven-springmvc-archetype
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Summary ------- Maven archetype providing a pre-configured Spring MVC setup out of the box. The setup represents how I like things configured for a quick setup so YMMV. This is my first archetype, feel free to send patches if you find something that can be improved. Contact ------- Chris Schaefer - [email protected] Features -------- Some features that work out of the box are: * Bare bones Spring MVC controller and a simple test. * Tomcat ready (maven plugin). * Annotation driven Spring MVC controllers. * Configured ContentNegotiatingViewResolver, with JSON as a registered media type. * JSTL view resolver. * Cookie based locale resolver / interceptor. * Transaction support. * UTF-8 character encoding filter for web pages. * Spring taglib support. * i18n support via Spring MessageSource. * Basic DataSource configuration, JdbcTemplate and TransactionManager configuration. Its up to you to configure the dataSource in datasource-beans.xml for persistence to actually do something. * PropertyPlaceholder support. Local Install ------------- clone repository cd maven-springmvc-archetype (or your custom clone location) mvn install Use --- cd ~/work (or wherever you want to build to) mvn archetype:generate \ -DarchetypeGroupId=com.dtzq \ -DarchetypeArtifactId=maven-springmvc-archetype \ -DarchetypeVersion=1.2-SNAPSHOT \ -DgroupId=your_group_id \ -DartifactId=the_artifact_id \ -Dpackage=the_package_name Answer the questions and the build will end up in a directory named after your artifact ID. Configure the dataSource bean in datasource-beans.xml to match your database configuration. cd $artifactId ; mvn package A WAR ready for deployment will be in target/ as $artifactId.war. If you have say tomcat running, simply run 'mvn tomcat:run' to deploy and test it. Go to http://localhost:8080/$artifactId and the example page should load. Change log: -- June 24, 2012: * Update README. * Updated Spring to 3.1.0-RELEASE. * Updated archetype version to 1.2-SNAPSHOT. * Removed build profiles. * Removed custom log4j file, moved to root of classpath, use stdout logger by default. * Remove annotation driven transactions and context scan of non @Component beans. Use standard XML wiring instead. * Moved config.properties into the spring configuration directory. March 13, 2011: * Update datasource configuration / remove JNDI lookup to work out of the box with Cloud Foundry auto reconfiguration. October 15, 2011: * General updates to this README. * Update version to 1.1-SNAPSHOT. * Removed webapp/static directory. Consider hosting these elsewhere. * Removed WEB-INF/classes and WEB-INF/lib, these should be generated / contents ignore by the generated project. * Converted package.html files to package-info.java. * Removed unneeded imports. * Updated taglib prefix, update web.xml verson to 2.5. * Rename web-beans.xml to application-beans.xml. Minor change but seemed redundant due to the dispatcher servlet beans configuration. * Updated context path in context.xml to reflect the artifact id. * Removed unused AOP namespace from datasource-beans.xml. * Update taglib definition into jsp-config block in web.xml. * Update path to application-beans.xml in web.xml. * Fixed "Use" section to reflect "-Dpackage" instead of "-DpackageName", fixed refs that were using artifactId and groupId with just the package variable. * Removed incomplete surefire definition in pom.xml. * Remove usage of warDirectory from tomcat-maven-plugin. * Remove maven-dependency-plugin, this was only used when using a warDirectory of src/main/webapp with the tomcat plugin. Use the standard target directory. * Update of some pom.xml properties (version number centralization). * Add development profile to set development specific configuration variables.
About
Maven archetype providing a Spring MVC setup.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published