fabrodev / maven-springmvc-archetype Goto Github PK
View Code? Open in Web Editor NEWMaven archetype providing a Spring MVC setup.
Maven archetype providing a Spring MVC setup.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.