Skip to content

bxtp4p-demos/codespaces-spring-boot-mysql-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codespaces-spring-boot-mysql-template

A template that can be used for creating a Spring Boot application with a MySQL backend.

What's included

  1. A MySQL server container
  2. 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.

How to use

To use this template, click on the Use this template button and select Open in a codespace.

How to run

H2 Database (default)

cd app
mvn clean package
java -jar target/app-0.0.1-SNAPSHOT.jar

MySQL Database

cd app
mvn clean package
java -jar -Dspring.profiles.active=mysql target/app-0.0.1-SNAPSHOT.jar

How to test

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.

About

Codespaces template example

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages