Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Arconia MariaDB Dev Services with Spring Data JPA

Application that demonstrates the use of Arconia Dev Services for MariaDB with Spring Data JPA. When running the application in dev mode or integration tests, a MariaDB database will be automatically started using Testcontainers and the database connection details will be automatically configured. As a developer, all you need to do is to add the arconia-dev-services-mariadb dependency to your project. Everything else is taken care of by the Arconia framework, building on top of Spring Boot's support for Testcontainers.

Pre-requisites

  • Java 25
  • Podman/Docker

Running the application

Run the application as follows:

./gradlew bootRun

Alternatively, you can use the Arconia CLI:

arconia dev

Under the hood, the Arconia framework will automatically spin up a MariaDB database server using Testcontainers (see Arconia Dev Services for more information).

The application will be accessible at http://localhost:8080.

Using the application

Start by creating a book using the httpie command line tool:

http POST :8080/books title="The Hitchhiker's Guide to the Galaxy"

You can then retrieve the list of books:

http GET :8080/books

You can also retrieve a specific book by its ID:

http GET :8080/books/1

Running the tests

You can run the tests using the following command:

./gradlew test

Alternatively, you can use the Arconia CLI:

arconia test

The integration tests will automatically get the database connection details from the Arconia Dev Services and run against the MariaDB database started by Testcontainers.