Docker fundamentals

Nowadays everybody is talking about Docker. Some people are well versed with docker concepts and have hands on it and some have started learning docker. So what is Docker?. As per the official docs from docker, Docker is a platform for developers and sysadmins to develop , deploy , and run applications with containers. So what does make it different. We were already doing that since long . When we are deploying application on servers we have to deal with setting up new VM , configuring dependencies / libraries, environment variables. Docker makes this thing easy for you, by providing OS level virtualization (aka. containerization). So basically you can create Docker images that will have all your resources ( env. variables / libs / running on what port). Then you can deploy your application inside docker container anywhere without even worrying about the dependencies. In traditional way you have to setup separate VM and then install all the required software and have

Spring RestTemplate : Follow Redirect Automatically

Follow Redirect Automatically in Spring RestTemplate.... Now since the boost of micro-service based architecture we use web-services a lot. Spring boot is one of the popular framework to work on Micro-service based architecture. Soap web-services are legacy swords and REST( Representational State transfer ) is now the modern time weapon in everybody's arsenal. When we use REST with Spring we have lot of inbuilt functionalities (Converting Response and request to Domain objects, Error handling, HttpStatus code and many more...) offered by Spring. Today we are going to check about RestTemplate. Spring's central class for synchronous client-side HTTP access. This is what Spring says about RestTemplate. RestTemplate provides support to all HTTP Methods. Most popular are GET and POST. So when we are calling any webservice endpoint using RestTemplate GET or POST there are chances that in response you get Redirect response (302 HTTP Status code). Which indicates that this

JShell : Test your logic right away

You might have heard about Java version 9 release and lot of buzzwords related to the new features that are going to unleashed from Oracle. New Module system(jigsaw) , Jlink and more tools are introduced. Today we will talk about one of the tool(aka. feature) which provides functionality that you might have used when you have used javascript and other languages... So, What it is .... REPL (Read-Evaluate-Print-Loop). So as you know, when you are writing software all these years, and at any point of time if you want to just execute some random code, some logic that you think it can work, you go to the command line shell (any shell that helps you to execute that language commands) and just right it there and execute..that's it.. Just check out the below features from your browser tools console executing javascript code (REPL feature). Python, Ruby, Haskell, Tcl also have  REPL features. Unfortunately java was lacking REPL feature from long time..and with the release o

Solve Illegal key size or default parameters

Solve Illegal key size or default parameters When first time I was working on AES 256 bit encyrption, I faced above exception. I tried everything and was frustrated what is the main cause. Then I reasearhed little bit on this, and found this has to do with " Java Cryptography Extension (JCE) Unlimited Strength Policy Files" . So, What is  JCE Unlimited Strength Policy ? So when you install JDK / JRE on your machine a normal version of JCE policy jars is included which doesn't support higher bit (256 in my case) encryption / decryption. The reason behind this is, US has restrictions on the export of cryptographic technology: They used to be very strict -- cryptography was classified as munitions, and you can only download the full strength products from the US and other white-listed countries. Restrictions have eased up a lot since then,

Why Spring

Today we will talk about Spring framework. Though you will find numerous websites and blogging available on internet regarding spring, I am going to put some more insight on why spring was needed and how the spring framework works. The basic motive of spring development was dependency injection and simplified programming model using java-beans (simple POJO). So what is mean by dependency injection.?     Every class will define there dependency. And the spring container will provide you the same.     for eg. You went to restaurant , and asked for a coffee, burgers. Now there are two types how the order will be delivered,         1. Self service. (Service Locator Pattern)         2. Service by the Restaurant staff. (Dependency injection)         1. The Service Locator Pattern:          Now in the above example the Restaurant is the Spring application container who provide all types of services. You ask the Spring application container for one service and look for it yourself.  

Lets Begin

Better late than never Though I wanted to start blogging since my college days, I never really gave great attention to it. In my professional and personal life I have read many blogs, websites, forums. From last few days, I had thinking that in  some ways  we can share our knowledge, thinking with people. You never know it might help someone, change someone else life.  Since I am from Information Technology background I will be mostly posting about technology and related stuff, but you may find some interesting stuff as well, so you will not get bored. विद्यां ददाति विनयं विनयाद् याति पात्रताम् । पात्रत्वात् धनमाप्नोति धनात् धर्मं ततः सुखम् ॥ True knowledge gives discipline, from discipline comes worthiness, from worthiness one gets wealth, from wealth (one does) good deeds, from that (comes) joy.