| | |
| | | import de.gedoplan.seminar.jpa.exercise.repository.HighwayRepository; |
| | | |
| | | |
| | | @RequestMapping(path = "exercise/highways", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | @RequestMapping(path = "/highways", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public class HighwayResource { |
| | | |
| | | // Some test data |
| | | private Highway testHighwayA1_DO_K = new Highway(4610, "A1", "Dortmund", "Cologne"); |
| | | private Highway testHighwayA2_DO_H = new Highway(4711, "A2", "Dortmund", "Hannover"); |
| | | private Highway testHighwayA33_BI_PB = new Highway(4812, "A33", "Bielefeld", "Paderborn"); |
| | | |
| | | private List<Highway> testHighways = List.of(this.testHighwayA1_DO_K, this.testHighwayA2_DO_H, this.testHighwayA33_BI_PB ); |
| | | |
| | | private final HighwayRepository highwayRepository; |
| | | private final Logger logger; |
| | |
| | | |
| | | // this.highwayRepository. |
| | | |
| | | this.logger.debug("Inserted: " + testHighways); |
| | | this.logger.debug("Inserted: " + highway); |
| | | } |
| | | |
| | | /** |