This repo is forked from https://github.com/HechengLi/Docker_SpringBoot_Tomcat_MySQL_Demo. Thanks to HechengLi for the inital work of setting up the Tomcat/Springboot/Java demo that this is built on top of.
You will need:
- Docker
git clone https://github.com/joe-elliott/tempo-springboot-example
- Open your commandline, cd to the git directory
- Run
docker-compose up
(add -d if you want it to run in background)
- If you get an error while starting tomcat, it probably is because the docker container running Tomcat doesn't wait for MySQL to finish running it's setup script.
- Wait for MySQL to finish running its script (it will log ...ready for connections...)
- Stop all containers and start again should fix the problem.
curl http://localhost:8080/TianMiao/api/users
curl -X POST -H 'Content-Type: application/json' -d '{"username": "test"}' http://localhost:8080/TianMiao/api/users
curl http://localhost:8080/TianMiao/api/users/1
curl -X PUT -H 'Content-Type: application/json' -d '{"username": "newUser"}' http://localhost:8080/TianMiao/api/notes/
- Open http://localhost:3000/explore and make sure that Tempo is selected.
- Search!