summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorSebastian Baltes <Sebastian.Baltes@uni-bayreuth.de>2025-05-13 21:54:23 +0200
committerSebastian Baltes <Sebastian.Baltes@uni-bayreuth.de>2025-05-13 21:54:23 +0200
commit1f715d85e17d2bf6c8d73df23e12252b993f74ff (patch)
tree3f430f6588e91c3e47793d7cd4f9957eb5bf4619 /README.md
parent21fc676c1b5a1d026e1489e9c8fabb80e652a50c (diff)
downloadse25-assignment03-1f715d85e17d2bf6c8d73df23e12252b993f74ff.tar.gz
se25-assignment03-1f715d85e17d2bf6c8d73df23e12252b993f74ff.zip
Add code or third assignmentHEADmain
Diffstat (limited to 'README.md')
-rw-r--r--README.md49
1 files changed, 49 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..9e974ad
--- /dev/null
+++ b/README.md
@@ -0,0 +1,49 @@
+# CampusCoffee (SE SS2025)
+
+## Spring Boot Web Application
+
+### Build and start application dev profile activated
+
+**Note:** In the `dev` profile, the repositories are cleared before startup and the initial data is loaded (see [`LoadInitialData.java`](https://github.com/se-ubt/ase24-taskboard/blob/main/application/src/main/java/de/unibayreuth/se/taskboard/LoadInitialData.java)).
+
+Build application:
+```shell
+mvn clean install
+```
+
+Start Postgres docker container:
+```shell
+docker run -d -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres:17-alpine
+```
+
+Start application (data source configured via [`application.yaml`](application/src/main/resources/application.yaml)):
+```shell
+cd application
+mvn spring-boot:run -Dspring-boot.run.profiles=dev
+```
+
+### REST requests (POS)
+
+#### Get POS
+
+All POS:
+```shell
+curl http://localhost:8080/api/pos
+```
+POS by ID:
+```shell
+curl http://localhost:8080/api/pos/1 # add valid POS id here
+```
+
+#### Create POS
+
+```shell
+curl --header "Content-Type: application/json" --request POST --data '{"name":"New Café","description":"","type":"CAFE","campus":"MAIN","street":"Teststraße","houseNumber":"99","postalCode":12345,"city":"Bayreuth"}%' http://localhost:8080/api/pos
+```
+
+#### Update task
+
+Update title and description:
+```shell
+curl --header "Content-Type: application/json" --request PUT --data '{"id":19,"name":"New Café (UBT)","description":"My description","type":"CAFE","campus":"MAIN","street":"Teststraße","houseNumber":"99","postalCode":12345,"city":"Bayreuth"}%' http://localhost:8080/api/pos/19 # set correct task id here and in the body
+```