BVB Source Codes

spring-mvc-showcase Show CustomArgumentController.java Source code

Return Download spring-mvc-showcase: download CustomArgumentController.java Source code - Download spring-mvc-showcase Source code - Type:.java
  1. package org.springframework.samples.mvc.data.custom;
  2.  
  3. import javax.servlet.http.HttpServletRequest;
  4.  
  5. import org.springframework.stereotype.Controller;
  6. import org.springframework.web.bind.annotation.ModelAttribute;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.RequestMethod;
  9. import org.springframework.web.bind.annotation.ResponseBody;
  10.  
  11. @Controller
  12. public class CustomArgumentController {
  13.  
  14.         @ModelAttribute
  15.         void beforeInvokingHandlerMethod(HttpServletRequest request) {
  16.                 request.setAttribute("foo", "bar");
  17.         }
  18.        
  19.         @RequestMapping(value="/data/custom", method=RequestMethod.GET)
  20.         public @ResponseBody String custom(@RequestAttribute("foo") String foo) {
  21.                 return "Got 'foo' request attribute value '" + foo + "'";
  22.         }
  23.  
  24. }
  25.  
downloadCustomArgumentController.java Source code - Download spring-mvc-showcase Source code
Related Source Codes/Software:
tushare - TuShare is a utility for crawling historical data ... 2017-01-12
raml-spec - RAML Specification http://raml.... 2017-01-12
android-stackblur - Android StackBlur is a library that can perform a ... 2017-01-12
sound-redux - A Soundcloud client built with React / Redux ... 2017-01-12
httpstat - curl statistics made simple 2017-01-12
discover-flask - Full Stack Web Development with Flask. ... 2017-01-12
micro - Async HTTP microservices made easy ... 2017-01-12
gobot - Golang framework for robotics, drones, and the Int... 2017-01-11
mas - 2017-01-13
Zappa - Serverless Python Web Services ... 2017-01-12
fartscroll.js - You want fart noises as you scroll? We've got you ... 2017-02-20
Remodal - No longer actively maintained. ... 2017-02-20
Chatto - A lightweight framework to build chat applications... 2017-02-20
richeditor-android - RichEditor for Android is a beautiful Rich Text WY... 2017-02-20
KeychainAccess - Simple Swift wrapper for Keychain that works on iO... 2017-02-20
emojicon - A library to show emoji in TextView, EditText (lik... 2017-02-20
postgres - Mirror of the official PostgreSQL GIT repository. ... 2017-02-20
shuttle - A simple SSH shortcut menu for macOS ... 2017-02-20
sticky-headers-recyclerview - [UNMAINTAINED] Sticky Headers decorator for Androi... 2017-02-20
octokit.rb - Ruby toolkit for the GitHub API ... 2017-02-20

 Back to top