Home > Tag Archives: Spring

Tag Archives: Spring

Configure Spring RestTemplate with OkHttp3 in Spring Boot Application


Okhttp3 is a popular HTTP client implementation for Java and we can easily embed it in our Spring Boot RestTemplate abstraction. Below is the Bean definition which binds the instance of Okhttp3 client with RestTemplate. Now to integrate in our implementation class we just need to autowire the Resttemplate to use this customized Okhttp3 based resttemplate. How to use RestTemplate ... Read More »

Configure Spring RestTemplate with HttpClient in the Spring Boot Application


In this post we will learn how to configure Spring RestTemplate with HttpClient in the Spring boot Applications. This example supports both HTTP and HTTPS. It Uses a connection-pool configurations to re-use connections and save overhead of creating connections. It has configurable request and socket timeouts, keep-alive strategy and also close idle connection strategy to monitor inactive connections and clean ... Read More »

Autowiring Components from external jars in Spring Boot Project


In an Spring Boot project, sometimes we have to autowire components which are available in another jar or in another module which is added as a jar in the main module of the project. Considering the use case of my spring boot application, I created my Spring Boot project, using maven modules. One of the modules was called daolayer, one ... Read More »

How to integrating DWR with Spring MVC

DWR: Easy AJAX for JAVA DWR is a RPC library which makes it easy to call Java functions from JavaScript and to call JavaScript functions from Java (a.k.a Reverse Ajax). DWR has a number of features like call batching, marshalling of virtually any data-structure between Java and Javascript (including binary file uploading and downloading), exception handling, advanced CSRF protection and ... Read More »

Resource Forwarding – Getting Page Response using DWR in Spring MVC

By this post I would like to describe my recent exposure with DWR2.0 and Spring2.0.Recently I got chance to develop my projects using Spring2.0 Framework. I really enjoyed working with Spring. Technologies reuired : 1).Spring MVC 2).DWR for AJAX calls 3).Hibernate3.0 4).Acegi security 5).Tiles 1.3 6).JSTL 1.1 DWR provides sufficient amount of support to all our ajax calls requirement.It allows ... Read More »