This project is an application skeleton for a typical Spring Boot backend application. You can use it to quickly bootstrap your projects and dev environment.
The seed contains a Patient Management sample application and is preconfigured to install the JEE framework and a bunch of development and testing tools for instant development gratification.
The app doesn't do too much, just shows how to use different standards and other suggested tools together:
- Spring Boot
- Spring Boot Web
- Spring Boot Data JPA
- JWT
- CORS
- Swagger
- Spring Boot Security
- Spring Boot Test
- Allure with JUnit
To get you started you can simply clone the seed-springboot
repository and install the dependencies:
You need git to clone the seed-springboot
repository.
You will need OpenJDK 11 and Maven.
Clone the seed-springboot
repository using git:
git clone https://github.com/systelab/seed-springboot.git
cd seed-springboot
In order to install the dependencies and generate the Uber jar you must run:
mvn clean install
To launch the server, simply run with java -jar the generated jar file.
cd target
java -jar seed-springboot-1.0.jar
A self signed certificate is provided in order to show use how to setup the application.
The certificate was generated with the following commands:
keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass password -validity 365 -keysize 2048
keytool -importkeystore -srckeystore keystore.jks -destkeystore keystore.p12 -deststoretype pkcs12
Do not use the certificate provided in production and never put any secret in your application.yml file.
You will find the swagger UI at https://localhost:8443/swagger-ui.html and http://localhost:8080/swagger-ui.html
First generate a token by login as user Systelab and password Systelab. After that authorize Swagger by copying the bearer.
Head to https://localhost:8443/hystrix and setup the URL https://localhost:8443/actuator/hystrix.stream in order to get the Hystrix Dashboard.
There is an Automated Build Task in Docker Cloud in order to build the Docker Image. This task, triggers a new build with every git push to your source code repository to create a 'latest' image. There is another build rule to trigger a new tag and create a 'version-x.y.z' image
You can always manually create the image with the following command:
docker build -t systelab/seed-springboot .
docker run -p 8443:8443 -p 8080:8080 systelab/seed-springboot
The app will be available at https://localhost:8443/swagger-ui.html
See Documentation section for further details about other technical specifications.