A template that can be used for creating a Spring Boot application with a MySQL backend.
- A MySQL server container
- A Spring Boot app preconfigured with Spring Initializr and includes:
- spring-boot-starter-web
- spring-boot-starter-data-jpa
- spring-boot-starter-test
- mysql-connector-java
- spring-boot-devtools
This also includes the Spring Initializr plugin so you can add additional starters as needed.
To use this template, click on the Use this template button
and select Open in a codespace
.
cd app
mvn clean package
java -jar target/app-0.0.1-SNAPSHOT.jar
cd app
mvn clean package
java -jar -Dspring.profiles.active=mysql target/app-0.0.1-SNAPSHOT.jar
Swagger UI is available. Due to a known issue with Codespaces port visibility and CORS, you will need to open this codespace in VS Code Desktop. Once you've done that and started the app, you can access Swagger UI at http://localhost:8080/swagger-ui/index.html.