Nee*_*ngh 6 java rest optimization response-time angularjs
我正在开发一个 电子商务 项目,该项目内部有四个项目(部分)。
1.) core - 有用户信息
2.) cms - 内容信息
3.) oms - 订单信息
4.) wallet - 支付信息
使用:-
UI -AngularJs
后端-java
我们对同一域进行了多个 REST API 调用(具有不同的路径和查询参数)。
有哪些方法可以优化 api 响应时间。
欢迎对 java 和 AngularJs 提出建议,而不是缓存,这给了我更多可以用来优化 api 响应时间的建议。
赞赏!
我在 stackoverflow如何优化 REST API 调用上发现了同样的问题,答案很有帮助,但没有找到适合我的最佳解决方案。
尝试对 Java-spring 项目使用以下配置:
# Enable response compression
server.compression.enabled=true
# The comma-separated list of mime types that should be compressed
server.compression.mime-types=text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json
# Compress the response only if the response size is at least 1KB
server.compression.min-response-size=1024
# Enable HTTP/2 support, if the current environment supports it
server.http2.enabled=true
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
27064 次 |
| 最近记录: |