Skip to main content

Posts

SSL in Spring Boot using GoDaddy certificate on EC2

In this article, we will be going to see how we can achieve the HTTPS in the spring boot application . You will get lots of items on how to use the self-generated certificate with Spring Boot. But today we are going to use the CA generated certificates with the Spring Boot so that our application will work on HTTPS. We need the following things to work: CA certificates including, private key and certificate. In this article, we are using the GoDaddy wild card certificate. Spring Boot application OpenSSL library Convert the certificate and private key to PKCS 12 First of all, we need to convert the CA certificate to .p12 format . We need to have OpenSSL on the system to work with command. Also, we need to have all files in the same directory where we are running this command. The command required to covert the same: openssl pkcs12 -export -in [ceritificate-name] -inkey [private-key] -name [host] -out [new-file.p12] Here replace the values: [ceritificate-name] with
Recent posts

First Time Deployment of war file to IBM Cloud

In this post, I will put a very basic deployment of Java war file on the IBM Cloud . Previously, IBM Cloud was known as IBM Bluemix . But in this post, I will prefer using the IBM Cloud and not the bluemix. I was facing problem while deploying the war file on the IBM Cloud for the first time. I am not a DevOps person who knows about the servers as well. But my job was to deploy the application on the IBM Cloud I need to do it. So, I tried googling around but have no idea about how to do it. There are some examples are given but they are not so basic to be understood by a developer who wants to deploy the application in Cloud. But I manage to do it. And I will explain all the steps that are needed to deploy the application to the Cloud. The application I am going to deploy is the Spring Boot application. Requirements 1. IBM Cloud account. 2. IBM Bluemix CLI 3. war file (spring-boot application) IBM Cloud  Setup After signing for IBM Cloud, go to the IBM Cloud Dashboard. IB

My JUnit Write Ups

I haven't written to my blog for a long time. There are times when you are busy and didn't get the time to work on the blogs. I am writing for Java Code Geeks for some time and busy with one of the projects that I was building for a client. Most of the blogs that I am writing was on JUnit. If you like this blogs do follow me on the Java Code Geeks at my author page . Also, if possible do upvote my links on DZone . I will be regularly writing on JUnit there. Hope you like those.

Hibernate Tips - a must have book

Recently one of my friend  Thorben Janssen started working on Hibernate Tips book. He is awesome and write wonderful blogs about Hibernate . He is well known for his blogs about Hibernate. You can read him on thoughts-on-java.org . He had completed the book and soon it will be available on Amazon for buying. Hibernate Tips: More than 70 solutions to common Hibernate problems Share maximum. Enjoy reading the Hibernate Tips. Congratulates to Thorben. You can reach him @thjanssen123 on twitter.

Error while configuring Spring with FreeMarker

Today I got a strange problem while configuring FreeMarker with Spring . The project compiles well without any error. All seems to be fine. When I tried to run the application strangely I got following error: Spring in Action, 4ed (Manning) java.lang.NoSuchMethodError: freemarker.template.Configuration. Lfreemarker/template/Version;)V Now for struggling and googling for around one hour I got the answer :) Instant FreeMarker Starter I am using Spring 4.3.5.RELEASE and FreeMarker 2.3.20 before I found the answer. This isstrange but the actual problem lies with the version compatibility of FreeMarker with Spring . It seems that Spring had some issues with FreeMarker . After changing the FreeMarker version from 2.3.20 to 2.3.23 all works fine. Hope this solution help the developers out there configuring FreeMarker with Spring. Enjoy coding!

AWS S3 processing with JetS3t library

In this post we will see how we can use the Amazon AWS S3 to store objects. We will be using the JetS3t library to process our objects.  JetS3t  library also known as Jet Set, is widely used for processing the AWS S3 i.e. Amazon Web Services, Simple Storage Service . Before working on AWS S3, you need to have a valid account on AWS with S3 key and S3 password. You can register here  free of cost. Amazon Web Services in Action (MANNING) Here we will using 4 API of jets3t i.e. Upload a document Download a document Listing of documents Delete a document We will upload images of user on S3 and then process them as specified above. Upload : to upload image to the S3 we will be using putObject () method of the S3Service class. Download : To download image we will be using getObject () method of S3Service class. List : To list images we will be using listObjects () method of S3Service class. Delete : To delete image we will be using deleteObjects () method of S3

IndicThreads '16 - Day 2

In my previous post  I had given details about the first day of the IndicThreads conference. Today I will try to cover sessions for 2nd day. The day was full of excitement as I have learned many new things. Sessions for today includes Go Language, HTTP/2, MicroServices, RxJava(Reactive Programming), Bitcoin and Blockchain. Go Language with Angular In this session Navneet Karnani , from Mandrake Technologies defines the scope of the Go language. He started with why we need a new language and how it can be used. He said that Go is a compiled language and it is also Open Sourced, so anybody can see code and change it to make it more better. Session is full of code and I swear it takes a lot of effort for him to make a such a great session on Go. This session is break in 2 parts where in first part he explains about the nuisances of language and in second part he shows the integration with AngularJS RxJava, Reactive Programming Praveer Gupta , from ThoughWorks who had given sess