Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eis/spring-mvc-example
Hello World with Spring MVC, coupled with VM & tests. A simple startup example.
https://github.com/eis/spring-mvc-example
java11 java8 spring-mvc
Last synced: 3 months ago
JSON representation
Hello World with Spring MVC, coupled with VM & tests. A simple startup example.
- Host: GitHub
- URL: https://github.com/eis/spring-mvc-example
- Owner: eis
- Created: 2013-09-24T15:55:41.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-04-14T16:42:34.000Z (10 months ago)
- Last Synced: 2024-04-16T07:05:36.106Z (10 months ago)
- Topics: java11, java8, spring-mvc
- Language: Java
- Homepage:
- Size: 104 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
spring-mvc-example
==================![]()
Hello World with Spring MVC, using Spring 5 xml configs, having Tomcat deployment
preconfigured. This is meant to be simplest-as-possible but with MVC
configuration and Maven POM ready to be deployed.In addition to being simple, it does have
- HTML GET interface ([/](http://localhost:8080/spring-mvc-example)) and JSON-using REST interface ([/add](http://localhost:8080/spring-mvc-example/add))
- "runme" build and deploy script
- Jetty-based deployment test
- integration tests
- robot acceptance test
- GitHub Actions build
- CodeCov integration
- Swagger documentation
- Vagrantfile with Tomcat setup
- Dockerfile with Tomcat setup
- Tomcat setup scripts for Ubuntu environmentInfra setup + build & run (Docker)
----------------------------------```
docker build . -t spring-mvc-example
docker run -p 8080:8080 spring-mvc-example
```Redeploy in Docker container
----------------------------
```
docker exec CONTAINERID mvn clean package
docker exec CONTAINERID mv target/spring-mvc-example.war /usr/local/tomcat/webapps/
```Infra setup (VM)
----------------```
vagrant up
```Infra setup (Ubuntu host)
-------------------------```
./ubuntu-deps.sh
./add-tomcat-admin.sh
systemctl restart tomcat8
```Build & run the app in VM
-------------------------First time (full cycle):
```
mvn -s settings-vm.xml tomcat7:deploy
```
Deploy again, only deploy:
```
mvn -s settings-vm.xml tomcat7:redeploy-only
```See the app yourself
--------------------[http://localhost:8080/spring-mvc-example](http://localhost:8080/spring-mvc-example)