Blog Archives
1 2

Spring batch industrial strength tutorial – part2

This assumes that you have read the spring batch beginner tutorial & industrial strength part 1. This is the final part. Step 1: The annotated Java classes are referenced directly due to following line in the batch-context.xml Step 2: You define the batch job as shown below. … Read more...



00: Create a simple REST API with Spring Boot

Q1. What is the key benefit of using Spring boot?
A1. The key benefit is that you can “build a production ready application from scratch in a matter of minutes”.

Over the years since its inception, Spring has grown to be very complex in terms of the amount of configuration an application requires.

Read more ›



01 : Spring Cloud with Eureka Discovery Server Tutorial

Q1. What is Spring Cloud? A1. Spring Boot is widely used to develop MicroServices. As many organisations deploy these services on the cloud like AWS, etc you need to take care of various aspects to make it cloud native, hence Spring Cloud was created. … Read more ›...



01: Simple Spring Boot Tutorial in 8 steps

Assumes that your Java, Maven, and eclipse are set up as per: Setting up Java, Maven, and eclipse

Step 1: Create a simple maven project using the maven “archetype” plugin.

The above command creates a folder “simple-spring-boot

Read more ›



02: Simple Spring Boot Restful Web Service Tutorial

This tutorial extends Simple Spring Boot Tutorial in 8 steps. Step 1: The pom.xml file that was created in the previous Spring boot tutorial needs to be changed from “spring-boot-starter-actuator” to “spring-boot-starter-web” Step 2: Add additional logic to the “ … Read more ›...



02: Spring Cloud to register client with Eureka Discovery Server Tutorial

This extends Spring Cloud with Eureka Discovery Server Tutorial. Step 1: Go to https://start.spring.io/ to create a skeleton spring-boot application. Add Eureka Discovery Client and Server as shown below: Click on “generate” to download the “my-sample-client-project.zip” file. … Read more ›...



03: Spring Boot Web & Actuator Beginner Tutorial Step by Step

Step 1: Create a simple maven project using the maven “archetype” plugin.

Step 2: Import it as an “existing maven project” into eclipse.

Step 3: The pom.xml file to bring in the Spring boot dependencies &

Read more ›



03: Spring Cloud Config Server with Git Tutorial

Q. Why do micro services applications require a config server? A. A Config Server is a MicroServices Architecture (aka MSA) feature where all configurable parameters of Microservices are written to & maintained. It is all about externalising properties/resources files out of the project code base to an external service so...



04: Spring boot MVC tutorial with thymeleaf & bean validation

Step 1: Create a “simple-spring-mvc” maven project. Step 2: Import the project into eclipse. File > Import -> Existing Maven Projects and select “C:\Users\java-_000\projects\simple-spring-mvc”. Step 3: The pom.xml file should look like: “spring-boot-starter-thymeleaf” … Read more ›...



04: Spring Cloud Config Client with Git Tutorial

Q. Why do micro services applications require a config server? A. A Config Server is a MicroServices Architecture (aka MSA) feature where all configurable parameters of Microservices are written to & maintained. It is all about externalising properties/resources files out of the project code base to an external service so...



05. Spring Cloud routing with Netflix’s Zuul

Q. What is Netflix’s Zuul usecase in Micro Services Architecture? A. In a typical micro service architecture you have many micro services running on different hosts and ports. The challenge with this type of architecture is how different clients like browser based Web Applications, Mobile based apps, … Read more...



06: Spring Cloud declarative REST client Feign

Q. What use Feign client?
A. Feign is a declarative web service client, which makes creation of web service clients a breeze.

1) Unlike a RestTemplate, Feign client acts as a load balancer. Spring Cloud integrates Netflix/ribbon and Netflix/eureka to provide a load balanced http client when using Feign.

Read more ›



07: Spring Cloud with Resilience4j CircuitBreaker

Q. What is Resilience4j?
A. Resilience4j is a fault-tolerance library implementing the Circuit Breaker pattern inspired by Netflix Hystrix, but offers a more convenient API and a number of other features like Rate Limiter to block too many frequent requests to some services,

Read more ›



08: Spring boot with OpenAPI (Swagger) tutorial

This tutorial extends Create a simple REST API with Spring Boot.

Q1. What is Swagger?
A1. The OpenAPI (used to be called Swagger) automates the documentation of REST APIs. Documentation of any REST Service API is a must because

1) Consumers of the services need to know which all services are available,

Read more ›



Basic Spring batch tutorial with Maven and Eclipse.

Batch jobs with Spring batch framework is very common and popular. This tutorial assumes that

1) You have set up you Java, Maven, and Eclipse

Once you have followed the following steps, you should have a project structure as shown below.

spring-batch-tut-1

Step 1: Create a new Maven project with the command shown below.

Read more ›



CDI annotations @Named and @Inject Dependency Injection in Spring 3.0 Tutorial

In Spring 3.0 the support for the CDI annotations @Named and @Inject are provided.

1) @Inject instead of Spring’s @Autowired to inject a bean.
2) @Named instead of Spring’s @Component to declare a bean.

Step 1: Create a simple Maven project.

Read more ›



Hibernate Query Language (HQL) tutorial

Step 1: The ER diagram showing the relationships among the tables. The column names and types are omitted to keep it simple. Step 2: The basic table details. The UserApp table uses “UserName” … Read more ›...



Hibernate tutorial with HSQLDB

This tutorial is basically an extension to the “Setting up” Java” and “JDBC tutorials”. Hibernate is an ORM (Object to Relational Mapping) tool. Step 1:  First step is to bring in the relevant Hibernate framework jar files like hibernate-xxx.jar, hibernate-annotations-xxxx.jar, … Read more ›...



JAXB with Spring ORM for marshaling tutorial

This extends Basic JAXB tutorial with Maven & XSD – 1 to marshall with Spring OXM and Spring XML.

Right mouse click on target/generated-sources and select “Build Path –> Use as Source Folder

Step 1: add spring-orm to use JAXB and spring-xml to use StringResult.

Read more ›



JAXB with Spring ORM for unmarshaling tutorial

This extends Basic JAXB tutorial with Maven & XSD – 1 to unmarshal with Spring OXM and Spring XML.

The Spring & JAXB marshaling tutorial used XML based config to inject the “jaxb2Marshaller”, but in this to make things a bit more interesting, let’s use “Java”

Read more ›



1 2

300+ Java & Big Data Interview FAQs

Java & Big Data Tutorials

Top