欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Spring 大量异步请求

程序员文章站 2022-07-14 12:46:38
...
AsyncRestTemplate asyncRestTemplate = new AsyncRestTemplate(new ConcurrentTaskExecutor(Executors.newFixedThreadPool(100)));

    asyncRestTemplate.exchange("http://www.example.com/myurl", HttpMethod.GET, new HttpEntity<>("message"), String.class)
            .addCallback(new ListenableFutureCallback<ResponseEntity<String>>() {
                @Override
                public void onSuccess(ResponseEntity<String> result) {
                    //TODO: Add real response handling

                    System.out.println(result);
                }

                @Override
                public void onFailure(Throwable ex) {
                    //TODO: Add real logging solution

                    ex.printStackTrace();
                }
            });


https://*.com/questions/40684174/spring-restcontroller-invoking-large-number-of-requests

https://*.com/questions/41157999/multiple-rest-calls-timing-out-in-spring-boot-web-application

https://*.com/questions/16047306/how-is-docker-different-from-a-normal-virtual-machine

https://dzone.com/articles/testing-improvements-in-spring-boot-14

http://www.cnblogs.com/ibook360/p/5674541.html

https://dzone.com/users/1016019/Emmanouil_Gkatziouras.html

http://javabeat.net/spring-data-jpa-query/

http://blog.takipi.com/deployment-management-tools-chef-vs-puppet-vs-ansible-vs-saltstack-vs-fabric/

https://www.flyml.net/category/big-data/cassandra/

http://www.infoq.com/cn/articles/spring-4-java-8

<form:select path="page.list[${loopStatus.index}].areaCode" id="areaCode" class="select validate[required]">
<form:options items="${districts}" itemValue="code" itemLabel="name" />
</form:select>