Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @RequestMapping(path = "/schedules")
- public class SchedulesController {
- @GetMapping("/{area}/{subarea}")
- public MyObject getFlight(@PathVariable("area") String area, @PathVariable("subarea") String subarea,
- MyModel model) {
- ...
- return new MyObject();
- }
- }
- @Data
- public class MyModel {
- LocalDate datestamp,
- String leadName,
- String viceLeadName
- }
- @RequestMapping(path = "/schedules")
- public class SchedulesController {
- @GetMapping("/{area}/{subarea}")
- public MyObject getFlight(@PathVariable("area") String area, @PathVariable("subarea") String subarea,
- @RequestParam(value = "datestamp", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate datestamp,
- @RequestParam(value = "leadName", required = false) String leadName,
- @RequestParam(value = "viceLeadName", required = false) String viceLeadName) {
- ...
- return new MyObject();
- }
- }
- @RequestMapping(path = "/schedules")
- public class SchedulesController {
- @GetMapping("/{area}/{subarea}")
- public MyObject getFlight(MyModel model) {
- ...
- return new MyObject();
- }
- }
- @Data
- public class MyModel {
- String area,
- String subArea,
- LocalDate datestamp,
- String leadName,
- String viceLeadName
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement