Skip to main content

Posts

Showing posts from 2019

Replace Email Template Using Java Pattern and Matcher Class

Let's say you have some simple email template that contains details like email address, phone/mobile or activation link, etc and you want to generate an email template without any free marker dependency using Java Pattern and Matcher class. So let's try to make that and also download a link is given bottom side. Step 1:    Here I created one email template which HTML code looks below. Hi {{user.first_name}} {{user.last_name}}, Welcome and thank you for subscribing. Now that you’ve subscribed, you’ll be receiving our emails {{freq.duration}}. These emails will contain our most recent article or news. You will also receive exclusive offers, promotions, and information on events. Our team is happy to have you on board. If you have any questions or comments, please don’t hesitate to contact us. You can simply reply to our emails or contact me directly using the contact information below. Thanks again! Step 2:  As you can see...

How to build and deploy a web project using BitBucket + Ubuntu Shell Script

In General, we deployed a web project using Jenkins or Pipelines (BitBucket) or many DevOps other tools but what we could do when we have a limited budget or resource for server-side. Is another way to build and deploy your web project automatically with a schedule? I will say, yes it is possible to do that. So let’s try to understand a process. Step1 : Here I will use Ubuntu Shell Script with a cronjob, Spring Boot ( Hello! World ), bitbucket, and AWS E2 Instance where we will deploy a web application. Here I created one Spring boot HelloWorld. As  you can see above the screen-shot, I created a package ` com.spring_boot.controller.HelloWorldController ` and rest controller inside it. And commit and push code in a bitbucket repository. Step 2 :  let’s connect to AWS EC2 instance Ubuntu and install requirement SDK like Open JDK 8, Maven, and Apache...