Coder Social home page Coder Social logo

maven-springmvc-archetype's Introduction

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.3-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.

maven-springmvc-archetype's People

Contributors

chrisjs avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.