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
MavenandTomcatdeployment process - hibernate app - fetching entities from
PostgreSQLdatabase withHibernateand writing them to JSON file viaJackson - spring app - XML-based
Springapplication which supports CRUD functionality usingServletandJSP - boot app -
Spring BootREST API service protected byJWT
git clone git@github.com:ojdgaf/java-examples.git
cd java-examples
scripts/build.shThe script above creates 4 Docker containers within "java-examples" network
- tom -
Tomcatdeployment server (port 8080)
Visit http://localhost:8080/webapp and http://localhost:8080/springapp to test webapp and springapp respectively
- mav -
Maveninstance (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 -
PostgreSQLdatabase (port 8082) - adm -
Adminerinstance (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