Skip to content

stormpath/stormpath-spring-boot-war-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#Stormpath is Joining Okta We are incredibly excited to announce that Stormpath is joining forces with Okta. Please visit the Migration FAQs for a detailed look at what this means for Stormpath users.

We're available to answer all questions at support@stormpath.com.

WAR files with Spring Boot

This is the code developed in the tutorial on deploying Spring Boot apps as a WAR.

It modifies an existing simple REST app https://github.com/stormpath/stormpath-spring-boot-jpa-example

Requirements

  • Maven
  • JDK 7
  • Tomcat 7

Running

To build and start the server simply type

$ mvn spring-boot:run

from the root directory.

Deploying on Tomcat

First build the WAR with

$ mvn clean package

Then copy the output WAR to Tomcat's webapps directory.

On Ubuntu the command is

$ sudo cp target/demo-0.0.1-SNAPSHOT.war /var/lib/tomcat7/webapps/demo.war

Using

You can see what urls are available using curl:

$ curl localhost:8080/demo

You can view existing people objects using a similar request:

$ curl localhost:8080/demo/persons

and can create new ones using a POST:

$ curl -X POST -H "Content-Type:application/json" -d '{ "firstName" : "Karl", "lastName" : "Penzhorn" }' localhost:8080/demo/persons

Todo

  • Different build profiles

License


MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages