Read-only mirror of https://github.com/eth-library/devbox-spring-demo — ETH Library. Issues & pull requests at the source.
  • Java 62%
  • Dockerfile 25.6%
  • HTML 12.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-25 14:37:30 +02:00
.devcontainer Remove postStartCommand 2024-09-17 12:52:23 +02:00
.github chore(deps): bump actions/checkout from 6 to 7 in /.github/workflows 2026-06-21 23:17:05 +00:00
.mvn Update local Maven repo path in maven.config 2024-09-03 11:35:04 +02:00
src test: migrate to RestTestClient 2025-10-27 13:15:00 +01:00
.gitignore Update .gitignore to exclude Devbox, Maven repository and target folder 2024-09-03 11:35:04 +02:00
devbox.json chore: update JDK version to 24 in devbox 2025-09-18 18:56:45 +02:00
devbox.lock chore: update JDK version to 24 in devbox 2025-09-18 18:56:45 +02:00
Dockerfile Expose port 8080 in Dockerfile 2024-09-16 17:07:33 +02:00
pom.xml chore(deps): bump org.springframework.boot:spring-boot-starter-parent 2026-08-24 23:16:12 +00:00
README.md docs(readme): mark project as archived and unmaintained 2026-08-25 14:37:30 +02:00

Note

This project is archived and no longer maintained.

It stays available read-only as a reference example. Dependency updates have stopped, so the versions below reflect the state at archival — expect them to fall behind. Feel free to fork it if you want to build on it.

Spring Boot Devbox Isolated Environment Demo

Project Overview

This project is a demonstration of a simple Spring Boot application using Devbox to create an isolated development environment. The goal is to ensure that all dependencies and configurations are managed within the project, promoting consistency across different development setups.

Technology Stack

  • Spring Boot Version: 4.1.1
  • Java Version: 24

Dependencies

The project includes the following dependencies:

  • Spring Boot Starter Web: For serving the web application, including RESTful services.
  • Spring Boot Starter Test: For unit testing with Spring Boot.

Building and Running the Project

Prerequisites

Ensure that you have Devbox installed and configured. Devbox manages the dependencies and environment configurations.

Steps to Run

Option 1: Locally

  1. Clone the repository

    git clone https://github.com/eth-library/devbox-spring-demo.git
    
    
  2. Navigate to the Project Directory

    cd devbox-spring-demo
    
    
  3. Switch to Devbox shell

    devbox shell
    
    
  4. Start the webserver

    mvn spring-boot:run
    
    
  5. Send a request to the endpoint

    curl "http://localhost:8080/greeting?name=Devbox%20Tester"
    
    

Option 2: Using GitHub Codespaces

  1. Fork this repository

  2. From the Code dropdown, select Create codespace on main

  3. Once the codespace has loaded, run devbox run start in the terminal to start the webserver.

    devbox run start
    
  4. When prompted, click Open in Browser.

Tip

If the popup is not visible, you can navigate to the Forwarded Ports tab, and open the Forwarded Address for port 8080.

  1. Success! You'll see the landing page and can now curl the greeting endpoint!

Custom Maven Settings

To maintain an isolated environment, a custom maven.config file is provided in the .mvn directory. This configuration ensures that all Maven dependencies are stored locally within the project rather than in a global repository. This approach helps to keep the development environment fully isolated, avoiding any interference from global dependencies.