This repository contains 4 simple projects to try and meet some Java tools:
- web app - one page web application without any Java code to get to know
Maven
andTomcat
deployment process - hibernate app - fetching entities from
PostgreSQL
database withHibernate
and writing them to JSON file viaJackson
- spring app - XML-based
Spring
application which supports CRUD functionality usingServlet
andJSP
- boot app -
Spring Boot
REST API service protected byJWT
git clone git@github.com:ojdgaf/java-examples.git
cd java-examples
scripts/build.sh
The script above creates 4 Docker
containers within "java-examples" network
- tom -
Tomcat
deployment server (port 8080)
Visit http://localhost:8080/webapp
and http://localhost:8080/springapp
to test webapp
and springapp
respectively
- mav -
Maven
instance (port 8081)
hibernateapp
creates JSON file after execution - use cat examples/hibernateapp/log.json
bootapp
is running in the background and available at http://localhost:8081
- pos -
PostgreSQL
database (port 8082) - adm -
Adminer
instance (port 8083)
see logs using cat examples/bootapp/run.log
import Postman collection and check out some endpoints
stop the container to stop the background execution
it supports live reload. in order to use this feature you have to create remote configuration in your IDE as well as enable autobuild and automake. although it's so inconvenient i'd rather suggest you to develop locally