Created
August 11, 2018 16:24
-
-
Save willianantunes/80c8991cf5f08ed1f5e9d8dd090ff817 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Controller | |
public class SampleController { | |
private static final Logger LOGGER = LoggerFactory.getLogger(SampleController.class); | |
@Autowired | |
private SampleService sampleService; | |
@GetMapping(REQUEST_PATH_SAMPLE) | |
public ModelAndView sample(@RequestHeader(HONEST_SAMPLE_HEADER) String honestSampleHeader) { | |
LOGGER.info("What was received in {}: {}", HONEST_SAMPLE_HEADER, honestSampleHeader); | |
sampleService.doTheThing(() -> honestSampleHeader); | |
ModelAndView view = new ModelAndView(VIEW_PATH_SAMPLE); | |
view.addObject(HONEST_SAMPLE_ATTRIBUTE, honestSampleHeader); | |
return view; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment