From 49c658820a5dae5469c55e64492e8067d67b1573 Mon Sep 17 00:00:00 2001 From: Antoine Rey Date: Fri, 2 Aug 2024 10:09:04 +0200 Subject: [PATCH 1/3] Add Dev Container configuration --- .devcontainer/devcontainer.json | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..153ca45b5 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,34 @@ +{ + "name": "Spring Petclinic Microservices", + // Java Development Container Images https://mcr.microsoft.com/en-us/product/devcontainers/java/tags + "image": "mcr.microsoft.com/devcontainers/java:17-bullseye", + // Features list https://containers.dev/features + "features": { + "ghcr.io/devcontainers/features/java:1": { + "installMaven": "true", + "installGradle": "false" + }, + "ghcr.io/devcontainers/features/azure-cli:1":{}, // Install Azure CLI + "ghcr.io/devcontainers/features/docker-in-docker:2":{}, // install docker + }, + "postCreateCommand": "apt-get update && apt-get install -y git", + "customizations": { + // Configure properties specific to VScode + "vscode": { + "settings": { + // VSCode settings https://github.com/redhat-developer/vscode-java/blob/master/README.md + "java.server.launchMode": "Standard" + }, + "extensions":[ + "vscjava.vscode-java-pack", + "vscjava.vscode-maven", + "github.vscode-github-actions", + "github.vscode-pull-request-github", + "redhat.vscode-xml", + "vmware.vscode-boot-dev-pack", + "mhutchie.git-graph" + ] + }, + }, + "forwardPorts": [8080, 8888, 8761] +} From 0804243832d268f220faf6029bbca9ddbd85659a Mon Sep 17 00:00:00 2001 From: Antoine Rey Date: Fri, 2 Aug 2024 10:14:18 +0200 Subject: [PATCH 2/3] Remove the postCreateCommand --- .devcontainer/devcontainer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 153ca45b5..aee21c032 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -11,7 +11,6 @@ "ghcr.io/devcontainers/features/azure-cli:1":{}, // Install Azure CLI "ghcr.io/devcontainers/features/docker-in-docker:2":{}, // install docker }, - "postCreateCommand": "apt-get update && apt-get install -y git", "customizations": { // Configure properties specific to VScode "vscode": { From abe6f44aaa3a75267ef0ba3bd1e51dc0394ff183 Mon Sep 17 00:00:00 2001 From: Antoine Rey Date: Fri, 2 Aug 2024 10:33:05 +0200 Subject: [PATCH 3/3] Add configuration tips for VS Code in Dev Container --- spring-petclinic-api-gateway/pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-petclinic-api-gateway/pom.xml b/spring-petclinic-api-gateway/pom.xml index f870bd915..e813364b9 100644 --- a/spring-petclinic-api-gateway/pom.xml +++ b/spring-petclinic-api-gateway/pom.xml @@ -152,6 +152,8 @@ ${wro4j.version} + + generate-resources run