Home  >  Q&A  >  body text

java - @Controller中方法参数自动获取form数据原理

SpringMVC中@Controller通过方法的形参就能获取Form的数据是什么原理。
查看官方文档没找到这块的内容,请大家提供一个关键字?

PHPzPHPz2744 days ago570

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-18 10:49:51

    http://www.cnblogs.com/fangji...

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-18 10:49:51

    Brother, have you ever written a servlet? Let’s skip the phenomenon and look at the essence. In fact, it is the request object of the underlying servlet that is packaged. Whether spring uses a proxy or a filter, the final result you see is that the method parameters under @requestMapping are just spring loaded through a series of packages and finally processed. The processed request extracts the packaged information. As for the source code, if you really have the patience to read it (you will definitely not be able to read it), the two packages spring-web and spring-webmvc have specific implementations. I have not seen them. Content, but I have seen spring-bean. Judging from the urinary nature of the latter package, the degree of encapsulation is absolutely terrifying

    reply
    0
  • Cancelreply