Skip to content
Snippets Groups Projects
Commit 0e470a99 authored by Michael Ruderer's avatar Michael Ruderer
Browse files

-

parent 2ea7d076
No related branches found
No related tags found
No related merge requests found
Pipeline #9913 failed
......@@ -36,10 +36,9 @@ maven-build:
- target/*.jar
container:
image: maven:3.6-openjdk-15
stage: deploy
script: mvn package jib:build -DskipTests
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_COMMIT_BRANCH == "master"'
when: manual
image: docker:latest
stage: deploy
script:
- echo -n $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY
- docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:latest .
- docker push $CI_REGISTRY_IMAGE:latest
......@@ -29,7 +29,7 @@ import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
@Controller
@RequestMapping("/boot")
@Tag(name = "boot", description = "Die Bootsapi")
@Tag(name = "boot", description = "Die Bootsapi2")
public class BootController {
private static Logger log = LogManager.getLogger(BootController.class);
@Autowired
......@@ -38,6 +38,7 @@ public class BootController {
/**
* <p> Boot form request.</p>
* <p>Expected HTTP GET and request '/edit'.</p>
* Das ist ein Test.
* @return
*/
@RequestMapping(value="/edit", method=RequestMethod.GET)
......
package de.thd.pms.controller;
import java.time.LocalDateTime;
import java.util.List;
import de.thd.pms.model.Boot;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import de.thd.pms.model.Person;
......@@ -18,6 +24,7 @@ import de.thd.pms.service.PersonService;
@Controller
@RequestMapping("/person")
@Tag(name = "person", description = "Die Personapi")
public class PersonController {
private static Logger log = LogManager.getLogger(PersonController.class);
@Autowired
......@@ -76,7 +83,7 @@ public class PersonController {
/**
* <p>Searches for all persons and returns them in a
* <code>Collection</code>.</p>
* <code>Collection</code>.</p>2
*
* <p>Expected HTTP GET and request '/findAll'.</p>
*/
......@@ -90,4 +97,12 @@ public class PersonController {
return mv;
}
@Operation(summary = "List all persons", description = "Alle Personen Laden")
@RequestMapping(value="/", method=RequestMethod.GET)
@ResponseBody
public ResponseEntity<List<Person>> rest_list() {
return ResponseEntity.ok(personService.findAll());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment