http protocol
References documentation for http protocol
Dubbo http protocol is base on HTTP form and Spring’s HttpInvoker
Features
- Number of connections: multiple connections
- Connection: short connection
- Transmission protocol: HTTP
- Transmission: synchronous transmission
- Serialization: form serialization
- Scope of application: Available browser view, the form or URL can be passed parameters, Temporary files are not supported.
- Applicable scenarios: Services that need to be available to both application and browser
Constraint
- Parameters and return values must be consistent with Bean specifications
Configuration
configure http protocol:
configure Jetty Server (default):
configure Servlet Bridge Server (recommend):
configure DispatcherServlet:
Note that if you use servlets to dispatch requests:
- the port of protocol
<dubbo:protocol port="8080" />
must same as servlet container’s. - the context path of protocol
<dubbo:protocol contextpath="foo" />
must same as servlet application’s.