Home » Enterprise Java » spring

spring

Spring REST with JSON Example

RESTful web services using JSON data format address the problems with SOAP web services using XML. REST can output data in different formats like Comma Separated Values (CSV) or Really Simple Syndication (RSS), but the most popular format is JSON. Compared to XML, JSON is not only more human readable but also lightweight. It’s easier for the browser to take ...

Read More »

Spring Boot JDBC Example

Do you want to learn about using Spring Boot with JDBC? Yes? Then you have come to the right place. This example is very straight forward and simple, even a 12 year old can understand. Let’s begin with our Spring Boot JDBC example. 1. Tools Apache Maven Mars Eclipse Spring Boot H2 Database Engine 2. Assumptions This article assumes that ...

Read More »

Spring SOAP with XML Example

Web services are the distributed computing mechanism designed to work with open standards and protocols, thus facilitating interoperability among disparate systems. Simple Object Access Protocol (SOAP) was developed by Microsoft as an improvement over the existing technologies like Distributed Component Object Model (DCOM), Common Object Request Broker Architecture (CORBA) and Java Remote Method Invocation (RMI) that relied on binary and ...

Read More »

Spring Web Application Example

In this article we will see how to develop a simple web application using Spring framework. This is a very simple example of developing a spring web application; it does not go into the details of performance, security, scaling etc. 1. Introduction Spring Framework is a Java platform that provides comprehensive infrastructure support for developing Java applications. Spring handles the ...

Read More »

Spring Integration Splitter Example

1. Introduction Spring Integration provides many components for processing messages before they reach their end point. Splitter is the component that breaks down a message into multiple messages based on specific criteria. The benefit is that after splitting, the system can apply separate business logic on each part. For example, in an order management system, separate parts of the order ...

Read More »

Spring Integration Kafka Tutorial

1. Introduction Apache Kafka started as an internal project at LinkedIn to solve the problem of scaling up the enterprise architecture from services talking to each other with strong typing contracts to an asynchronous message-based architecture. Both message persistence and high throughput were the goals of their new system. In addition, messages were required to be acknowledged in order and ...

Read More »

Spring Integration DirectChannel Example

1. Introduction This article discusses the implementation of Spring Integration Direct Channel in a Spring Boot application. Spring Integration supports Enterprise Integration patterns, of which the message channel pattern decouples the producer and consumer endpoints and is agnostic to the message payload. A message channel provides for connectivity with various components like filters and adapters. There are good articles giving ...

Read More »

Spring MVC File Download Example

Hello readers. Spring framework provides an out of box support for the file download functionality from the server to a local machine. In this tutorial, we will show you how to implement the file download functionality with the Spring Mvc framework. To handle the file download capability in a web application, we will use the HttpServletResponse to directly write a ...

Read More »

Spring MVC using Log4j Example

Log4j is a popular and widely-used logging framework for the Java development. It’s pretty easy to setup and use the Log4j mechanism in a Spring Mvc application. In this tutorial, I will show you how to implement the logging functionality with the Spring Mvc framework. 1. Introduction 1.1 Spring Framework Spring is an open-source framework created to address the complexity ...

Read More »

Spring Batch Job Parameters Example

In this article we shall show you how you can pass job parameters to a spring batch job. 1. Introduction A typical enterprise application requires a batch job that consists of one or more steps. Each step reads the input data, processes the input data, and writes the processed data to the configured output. In a batch job with more ...

Read More »