| | |
| | | package de.gedoplan.seminar.sbt.di.exercise.rest; |
| | | |
| | | import de.gedoplan.seminar.sbt.di.exercise.domain.Cocktail; |
| | | import de.gedoplan.seminar.sbt.di.exercise.service.BarInfo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | @RequestMapping("bar") |
| | | public class BarResource { |
| | | |
| | | @Autowired |
| | | private BarInfo barInfo; |
| | | |
| | | @GetMapping(path = "name", produces = MediaType.TEXT_PLAIN_VALUE) |
| | | public String getName() { |
| | | return null; |
| | | return barInfo.getBarName(); |
| | | } |
| | | |
| | | @GetMapping(path = "cocktails", produces = MediaType.APPLICATION_JSON_VALUE) |