No description, website, or topics provided.
Java HTML CSS
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/main/resources
.gitignore
README.md
archetype-catalog.xml
pom.xml

README.md

Simple example integrating the commercetools JVM SDK with Spring MVC and Spring DI

screen shot 2015-12-02 at 10 18 06

Create a project

requirements:

mvn archetype:generate \
  -DarchetypeGroupId=com.commercetools.maven-archetypes \
  -DarchetypeArtifactId=commercetools-spring-mvc-quickstart \
  -DarchetypeVersion=0.4.0 \
  -DgroupId=io.sphere.demo \
  -DartifactId=commercetools-spring-mvc \
  -Dversion=0.1.0-SNAPSHOT \
  -DcommercetoolsProjectKey=YOUR-PROJECT-KEY \
  -DcommercetoolsClientId=YOUR-CLIENT-ID \
  -DcommercetoolsClientSecret=YOUR-CLIENT-SECRET

Change to the project folder

cd commercetools-spring-mvc

Run the project

mvn tomcat7:run

Test on the browser

http://localhost:8080/

Creating a new project in Eclipse

  • Import archetype URI by Import ... > Projects from Git > Clone URI
  • Install the archetype in local repository with mvn install
  • Go to Preferences > Maven > Archetypes and Add Local Catalog
  • Select the catalog from file (archetype-catalog.xml)
  • Create new Maven project and select the archetype (remember so select Include snapshot archetypes)

If you have any troubles with installation in Eclipse, you may want to have a look at this issue: #74

Credits

This template is a modified copy of https://github.com/kolorobot/spring-mvc-quickstart-archetype