annotate spring-boot-playground/src/main/java/de/comline/spring/controller/CustomLogicController.java @ 20:452cfefb0e1e default tip

Einfache Spring Application, die ihre config aus dem Spring Cloud Config Server liest
author Dirk Olmes <dirk.olmes@codedo.de>
date Thu, 17 Sep 2020 17:25:15 +0200
parents 60afb461bf6c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
1 package de.comline.spring.controller;
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
2
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
3 import org.springframework.beans.factory.annotation.Autowired;
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
4 import org.springframework.web.bind.annotation.RequestMapping;
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
5 import org.springframework.web.bind.annotation.RestController;
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
6
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
7 import de.comline.spring.service.CustomLogicService;
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
8
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
9 @RestController
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
10 public class CustomLogicController {
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
11 @Autowired
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
12 private CustomLogicService service;
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
13
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
14 @RequestMapping("/svc")
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
15 public String getCustomLogic() {
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
16 return service.doit();
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
17 }
60afb461bf6c Import des Spring boot playground
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
18 }