Skip to main content

Posts

Showing posts from May, 2019

QR Code Generate using zxing in spring boot

WHAT IS QR CODE AND HOW TO GENERATE QR CODE USING JAVA:           QR Code stands for Quick Response Code first design in Japan in 1994. The QR code is the trademark for a type of matrix barcode. The main purpose is to store information and is easily read by the advanced mobile system. The QR code is the two-dimensional bar code which store the piece of information.in the QR code information are encoded in 4 standardized encoding mode (numeric, alphanumeric, byte/binary, and kanji)    to store data efficiently. In Java, we can generate a QR code using zxing API provided by Google .zxing API support 4000 characters to encode. So without wasting any time let begin with an example for a better preference. PROJECT STRUCTURE: MAVEN DEPENDENCIES:        Put the dependencies on pom.xml pom.xml: <!-- https://mvnrepository.com/artifact/com.google.zxing/core --> ...

Send FTL In Email Using Spring Boot

                  In this topic, we discuss mail protocol and how to send email using mail library and how can we sent an email with more dynamic and with some more graphical interface and it's really looking good than the traditional email content. Here we use FTL to make email a more graphical experience. We try to show the example of this topic as possible as an easy way. so without wasting any time let's start the topic. WHAT IS FTL AND WHAT'S THE BENEFITS?          FTL(Free marker template) is a Java-based template language which is used to make the more dynamic and graphical experience on screen. FTL discovered by Apache foundation. It focuses on java based dynamic template design. Free marker template file extension is .ftl which is approx. as same as HTML code but the major difference is, we can send the data from Java source classes to show dynamic content. It's the main focus on MVC architec...

Scheduler(Task Executor) In Spring Boot

WHAT IS A SCHEDULER?       Firstly know about what is scheduling. Scheduling is a process that executing a task in a certain time period. A scheduler is a tool, the main objective is to implement the scheduling process. Mainly scheduler is used to perform the batch task for the repeated manner and perform the action of task without any outer other events. IMPLEMENTATION OF SCHEDULER IN SPRING BOOT:        In spring boot we can implement scheduler in multiple ways but here we use the annotation to implement the scheduler. In spring boot we can implement scheduler using @Scheduled annotation. The @Scheduled annotation internally uses the TaskScheduler interface to schedule a task. To enable the @Scheduled annotation we must use @EnableScheduling annotation in the Configuration file.        Let's start with an example of task scheduler. Her we use STS(spring tool suite) to build the spring boot project. First, b...

Interceptor In Spring boot

WHAT IS INTERCEPTOR?        Interceptor is work as a middle object. Interceptor handles the HTTP request before it executes by the controller's method. If you want to perform some task before the controller start executes the HTTP request then we use to the handler adapter and use by dispatcher servlet. Handler Adapter uses handler interceptor to perform the action. Handler interceptor has various methods which are used to perform the action before handling, after handling and after completion . Using interceptor we can perform the operation before request handled by the controller and after the controller send the request to the client. WHAT IS SPRING BOOT INTERCEPTOR?                 In spring boot to implement interceptor, we must implement the Handler Interceptor interface. Handler Interceptor interface intercepts the client request before the request process in the controller. Handler Interceptor interface has 3 methods ...