Skip to content

Commit de020c4

Browse files
committed
added devcontainer.json
1 parent 598ee94 commit de020c4

File tree

2 files changed

+43
-5
lines changed

2 files changed

+43
-5
lines changed

.devcontainer/devcontainer.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/java
3+
{
4+
"name": "Java",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/java:0-17",
7+
8+
"features": {
9+
"ghcr.io/devcontainers/features/java:1": {
10+
"version": "none",
11+
"installMaven": "true",
12+
"installGradle": "false"
13+
}
14+
},
15+
16+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
17+
"forwardPorts": [8080],
18+
19+
// Use 'postCreateCommand' to run commands after the container is created.
20+
// "postCreateCommand": "java -version",
21+
22+
// Configure tool-specific properties.
23+
"customizations": {
24+
// Configure properties specific to VS Code.
25+
"vscode": {
26+
// Set *default* container specific settings.json values on container create.
27+
"settings": {},
28+
"extensions": [
29+
"vscjava.vscode-java-pack",
30+
"vmware.vscode-boot-dev-pack",
31+
"vmware.vscode-spring-boot"
32+
]
33+
}
34+
}
35+
36+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
37+
// "remoteUser": "root"
38+
}

pizza/src/main/java/ch/fhnw/pizza/PizzaApplication.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

33
import org.springframework.boot.SpringApplication;
44
import org.springframework.boot.autoconfigure.SpringBootApplication;
5-
//import org.springframework.web.bind.annotation.GetMapping;
6-
//import org.springframework.web.bind.annotation.RestController;
5+
import org.springframework.web.bind.annotation.GetMapping;
6+
import org.springframework.web.bind.annotation.RestController;
77

88
@SpringBootApplication
9-
//@RestController
9+
@RestController
1010
public class PizzaApplication {
1111

1212
public static void main(String[] args) {
1313
SpringApplication.run(PizzaApplication.class, args);
1414
}
1515

16-
/* @GetMapping(value="/")
16+
@GetMapping(value="/")
1717
public String getWelcomeString() {
1818

1919
return "Pizza Takeaway Service, welcome!";
20-
} */
20+
}
2121

2222
}

0 commit comments

Comments
 (0)