Skip to content

A repo of CRUD examples that uses different embedded containers, instead of the default which is Tomcat.

Notifications You must be signed in to change notification settings

Ajsalemo/SpringBootEmbeddedContainers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpringBootEmbeddedContainers

A repo of CRUD examples that uses different embedded containers, instead of the default which is Tomcat.

jetty - Usage

A TODO/CRUD application connected to a Postgres database using Jetty as its embedded container.

Create an Azure Database for PostgreSQL instance and set the following environment variables in the application.properties file to the below:

  • ${POSTGRES_HOST}: The host name of your Postgres server

  • ${POSTGRES_DATABASE_NAME}: The name of your Postgres database. The jetty example uses 'jettytodos'. Refer to the jetty/database folder.

  • ${POSTGRES_USER}: The Postgres username

  • ${POSTGRESL_PASSWORD}: Your Postgres password

  • Routes:

    • /api/v1/todo/add: A POST request to add new tasks.
    • /api/v1/todo/delete: A DELETE request to delete a todo by ID.
    • /api/v1/todo/find/{id}: A GET request to find a todo by ID.
    • /api/v1/todo/all: A GET request to get all todos.

undertow - Usage

A CRUD application to add books connecting to a MySQL database using Undertow as its embedded container.

Create an Azure Database for MySQL instance and set the following environment variables in the application.properties file to the below:

  • ${MYSQL_HOST}: The host name of your MySQL server

  • ${MYSQL_DATABASE_NAME}: The name of your MySQL database. The undertow example uses 'undertowbooks'. Refer to the jetty/database folder.

  • ${MYSQL_USER}: The MySQL username

  • ${MYSQL_PASSWORD}: Your MySQL password

  • Routes:

    • /api/v1/books/add: A POST request to add new books.
    • /api/v1/books/delete: A DELETE request to delete a book by ID.
    • /api/v1/books/find/{id}: A GET request to find a book by ID.
    • /api/v1/books/all: A GET request to get all books.
  • Both examples have a Swagger endpoint available to them by accessing the /swagger-ui/ endpoint.

About

A repo of CRUD examples that uses different embedded containers, instead of the default which is Tomcat.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published