A simple Java applicaton developed using Spring boot generators to
quickly bootstrap a customized spring boot application
You can use this custom generator to quickly build a web application
with preconfigured artifactid, groupid, names and specific dependencies.
When generating projects from standard generators like start.spring.io,
you need to rename the artifactid, groupid, name and add some dependencies.
With one single command line you can do all the above using this generator.
Below are the softwares that needs to be installed as a dependency
Maven
Docker (to build Docker image)
httpie (command line tool) or curl is also good enough
You can either clone this repo, build the application or run the docker container
docker pull rakgenius/springboot-generator:v1and run the image image using
docker run -it -d -p 8081:8081 rakgenius/springboot-generator:v1Then navigate to
http://localhost:8081
This will display all the supported actions.
1 . Git clone the repo to any machine
2 . Build the packages using the command
mvnw package -DskipTests4 . Run the application using
java -jar target/demo-0.0.1-SNAPSHOT.jarBelow are the useful commands
http http://localhost:8081/starter.zip -dhttp http://localhost:8081/starter.zip dependencies==web javaVersion==11 -dhttp http://localhost:8081/starter.tgz dependencies==web,data-jpa type==gradle-project baseDir==my-dir | tar -xzvf -http http://localhost:8081/pom.xml packaging==war -o pom.xml dependencies==web,data-jpa,thymeleaf,actuatorBelow are the command to build the docker image and to publish it to docker hub
1 . Build the docker image using
docker build -t springboot-generator .2 . Run the docker image using
docker run -d -it -p 8081:8081 --name springboot-generator springboot-generator3 . Create your own image which has to be pushed to the docker hub
docker image lsGet the "IMAGE ID" of "springboot-generator" image
Set the tag to your image
docker tag <IMAGE TAG OBTAINED ABOVE> <your dockerhub username>/springboot-generator:latest4 . Now push the docker image to docker hub
docker push <your docker hub username>/springboot-generator6 . Now you can pull the image on any machine anywhere using
docker pull <your dockerhub username>/springboot-generatorAnd run it using the command mentioned in step 2.
- Maven - Dependency Management
Rakesh Venkatesh