Prepare the database by running devbox run setup_db. This will create the user and database
that Spring expects in stacks/spring/src/main/resources/application.properties
You can now start the Spring Boot service by running devbox run bootRun. This will start your
MySQL service and run the application
You can test the service using GET localhost:8080/demo/all or POST localhost:8080/demo/add.
See the Spring Documentation for more details.
This example uses the Spring Boot initializer to create the project.
You can use any method you like to create your Spring Boot project, but you will need to make sure
that the devbox.json and devbox.lock files are in the same directory as your build.gradle
file.
This example hardcodes a username and password for development purposes. For production or more
secure usecases, you should change them and exclude them from source control.
This distribution uses the OpenJDK. You can find other JDK distributions using devbox search