Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1.        
  2. //test
  3.  mvc.perform(get("/v1/bus-positions")
  4.                 .accept(MediaType.APPLICATION_JSON))
  5.         .andDo(print()) .andExpect(status().isOk());
  6.  
  7. //BusPredictionController
  8.     @ApiOperation("Returns all actual bus positions")
  9.     @GetMapping("/bus-positions")
  10.    //@Secured("ROLE_app-user")
  11.     public List<Journey> getJourneys (){
  12.         return busPredictionService.getJourneys();
  13.     }
  14. //busPredictionService
  15.     @Override
  16.     public List<Journey> getJourneys ()
  17.     {
  18.         journeyControllerApi.getApiClient().setBasePath("http://localhost:8081/timetableservice");
  19.  
  20.         return journeyControllerApi.getJourneysByIdsUsingGET("1");
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement