Mercurial > hg > SpringPlayground
annotate spring-boot-playground/src/main/java/de/comline/spring/controller/CustomLogicController.java @ 5:227f3105fedd
Erster Unit Test, der das repository einfach nur mockt
author | Dirk Olmes <dirk.olmes@codedo.de> |
---|---|
date | Thu, 13 Aug 2020 15:58:57 +0200 |
parents | 60afb461bf6c |
children |
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 } |