Spring

Spring Beans in Java

Reading Time: 2 minutes Spring IoC container is the core of the Spring Framework.In spring-based applications, objects live inside a spring containerThe container instantiate the objects, wires them together and manages their complete life cycle from creation till destruction.These objects in the Spring IoC container are referred to as beans. What is Inversion Of Control(IoC)? IoC simply means giving control to spring container to create and instantiate the spring beans Let`s say you want to Continue Reading

Service discovery and registry using spring and eureka

Service Registry and Discovery with Eureka

Reading Time: 8 minutes Hi all. In this blog we will see how we can leverage spring boot and Eureka server to do a Service Registry and Discovery. In the world of microservices scalability and elasticity is mandatory. That means, we can scale our services both up and down to meet the variant load requirements. Typically, this includes creating and destroying the instances of our services. Microservices communicate with Continue Reading

How to handle URL Encoded Form Data in Spring REST?

Reading Time: 3 minutes Sometimes, our REST endpoint needs to consume data in the form of application/x-www-form-urlencoded or using multipart/form-data. The source of this data can probably be an HTML form. Now, the first question which should come to our mind is, what is exactly this application/x-www-form-urlencoded or using multipart/form-data and how can we let our spring application consume this. This blog will help you to find answers to Continue Reading

Still with Spring? 9 reasons to Akka

Reading Time: 3 minutes As a niche consulting and development organization we end up in a lot of enterprises who would like to modernize, would like to build web-scale products but they are not ready to look beyond Spring. It is a strongly debated topic and there are reasons for still going the Spring way but the reasons are less and less as we go ahead. For starters, this Continue Reading

Developers Needs SDKMAN Not Super-Man

Reading Time: 4 minutes Every developer has pain for setup development environment to his/her machine with lots of the setups. Sometimes, the pain goes beyond while we need to test same application on multiple versions of SDKs or virtual machines. If you are a Mac user, you have the best option called brew installer. But if you are Linux user, your pain is unpredictable. We are JVM stack developers Continue Reading

Testing Jersey Based REST Services with Grizzly

Reading Time: 2 minutes In my last post, we had seen how easy it was to create REST based services with Spring and Jersey. In this post we would quickly see how we can unit test them. Ok, this is not entirely a unit test in the strict sense because we are not testing the resource in isolation but it is a good strategy nevertheless because it helps us Continue Reading

Just REST, it’s Easy With Spring and Jersey

Reading Time: 4 minutes In one of the products that we are working on, there is a need to expose the API as REST so that it can be consumed by the developer community and foster innovation. I did a few prototypes for the combination of dependency injection and REST with Restlet, Guice, Jersey and Spring and finally settled with Jersey and Spring primarily due to the easy configuration Continue Reading

Working With Spring Data JPA

Reading Time: 3 minutes SpringSource have recently released the first milestone of Spring Data JPA project. What are its features? and how can we use them. Spring framework already provides support to build a JPA based data access layer. So, what does Spring Data adds to it. I used it for one small application and found significant reduction of code. In this post we will use an Employee entity Continue Reading

Configuring Spring Application Using Configuration Annotation

Reading Time: 2 minutes A Spring Module called Java Config has been there for some time now. With the release of Spring 3.0 SpringSource has pulled this module into the core Spring Framework as @Configuration. How can we use this @Configuration in our application? and should we use it when we have XML and annotations for configuration already? In Spring 2.5 we find that there is a support for Continue Reading