https://github.com/perusworld/spring-3-base
Maven Spring 3.x Web/REST App Base
https://github.com/perusworld/spring-3-base
Last synced: 5 months ago
JSON representation
Maven Spring 3.x Web/REST App Base
- Host: GitHub
- URL: https://github.com/perusworld/spring-3-base
- Owner: perusworld
- Created: 2016-12-05T20:54:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-09-15T21:25:38.000Z (almost 2 years ago)
- Last Synced: 2024-09-15T23:35:55.644Z (almost 2 years ago)
- Language: Java
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Maven Spring 3.x Web/REST App Base #
Maven/Spring 3.x Web/REST app base code
## Requirements ##
1. JDK 1.7+
1. Maven
## Run with Remote Debug ##
set MAVEN_OPTS=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
mvn -Djetty.http.port=3000 jetty:run
## Package War ##
mvn clean package
## Test App ##
Open browser and goto [http://localhost:3000](http://localhost:3000)
## Test REST APIs -cURL ##
### GET ###
```bash
curl -X GET -H "Accept: application/json" -H "Cache-Control: no-cache" "http://localhost:3000/api/helloREST/peru"
```
### POST ###
```bash
curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{
"msg": "peru"
}' "http://localhost:3000/api/helloREST"
```