Difference between annotation-config and component-scan

annotation-config and component-scan are important basic concepts of Spring Core.
This tutorial helps you understand how to use them and difference between them.

[Continue reading…] “Difference between annotation-config and component-scan”

How to import CSV data to PostgreSQL Database using Spring Batch Job

Spring Batch is a powerful module to implement a batch process for tons of data conveniently.
This tutorial guide you how to import CSV Data to PostgreSQL Database using Spring Batch Job.

Related Articles:
How to start with Spring Batch using Spring Boot
How to use Spring JDBC Template for Postgres Database

[Continue reading…] “How to import CSV data to PostgreSQL Database using Spring Batch Job”

Spring XD Stream – PostgreSQL JDBC Sink

Spring XD JDBC sink can be used to insert message payload data into a relational database table. The tutorial will introduce you how to work with PostgreSQL JDBC Sink

Related Article: Spring XD Stream – How to start with Stream

[Continue reading…] “Spring XD Stream – PostgreSQL JDBC Sink”

Spring XD Stream – How to start with Stream

Spring XD stream is a big data solution for how to ingestion. Each Stream is defined by 3 kinds of module: Source, Sink & Processor.

The tutorial will introduce Spring XD Stream.

Relate Post: Spring XD Batch Job – How to Start

[Continue reading…] “Spring XD Stream – How to start with Stream”

How to use Spring JDBC Template with Spring Boot for Postgres DataBase

The tutorial shows you how to use Spring JDBC Template to access  & manipulate database (Postgres DB) with Spring Boot.

[Continue reading…] “How to use Spring JDBC Template with Spring Boot for Postgres DataBase”

Spring MVC – @RequestMapping with Methods, Headers, Params, @PathVariable and @RequestParam

Creating RESTful web services is more comfortable and simpler when using Spring MVC Annotation.
The tutorial shows you how to use @RequestMapping with Methods, Headers, Params, @PathVariable and @RequestParam.
We will have an example which almost covers all @RequestMapping cases.

[Continue reading…] “Spring MVC – @RequestMapping with Methods, Headers, Params, @PathVariable and @RequestParam”

Spring MVC RESTful Web Service – difference between @Controller and @RestController

Creating RESTful web services is more comfortable and simpler when using Spring MVC Annotation.
The tutorial shows you overview of a traditional Spring MVC Controller and the Spring MVC RESTful Web Service Controller which are implemented in new Spring Framework, and difference between 2 annotations: @Controller and @RestController.

[Continue reading…] “Spring MVC RESTful Web Service – difference between @Controller and @RestController”

Spring Stereotype Annotations – Difference between @Service and @Repository

Spring provides some stereotype annotations, among them, @Service and @Repository are special cases of @Component for specific purposes. By annotating component classes with @Service, @Repository, your classes are more clear, thus, Spring will automatically scan and import those beans into the container, so we don’t need to define them using XML.

This tutorial show you overview of Repository Pattern & a Service Layer, as well as difference between @Service & @Repository.

[Continue reading…] “Spring Stereotype Annotations – Difference between @Service and @Repository”

Cloud DataLab & Google Spreadsheet for Visualizing data with BigQuery

Google Cloud Datalab is a powerful interactive tool for visualizing data of Google Cloud. It runs locally and connects to cloud services for exploring data.

We also use Cloud DataLab & Google Spreadsheet for Exploring data with Bigquery.

[Continue reading…] “Cloud DataLab & Google Spreadsheet for Visualizing data with BigQuery”

Spring XD Batch Job – How to Start

The Spring XD provides a one stop shop for Bigdata solution, is a unified, distributed, and extensible service for data ingestion, real time analytics, batch processing, and data export. The tutorial will guide you how to create a Batch Job Application with Spring XD.

Related Articles:
Spring XD Stream – How to start with Stream

[Continue reading…] “Spring XD Batch Job – How to Start”

Spring Based Configuration – Java Annotation

Spring based configuration using Annotation help you to create Spring configurations without XML.
This tutorial give you an example with most of Spring Annotation for configuration: @Configuration, @Bean (with custom bean lifecycle method), @Import, @Scope. And they’re in multi-configuration context.

[Continue reading…] “Spring Based Configuration – Java Annotation”

Spring IoC Container

At the Core of Spring Framework, Spring IoC (Inversion of Control) is implemented using the Dependency Injection design pattern. The Spring IoC Container creates, configures and connects the objects (which are called Beans), then manage their life cycle.

This tutorial introduce principle of Spring IoC and a simple example using Containers to you.

[Continue reading…] “Spring IoC Container”

Spring Bean Post Processors

The BeanPostProcessor interface helps us provide our own methods before the initialization of beans and likewise after the initialization of the bean.

BeanPostProcessor are common for all beans in the container where it is defined, so it is different from @PostConstruct, InitializingBean and custom init method which are defined on the bean itself.

Related Article: Spring Bean Life Cycle

[Continue reading…] “Spring Bean Post Processors”

Spring JPA Web Support

Spring JPA Web support ships by a module for convenient programming with repository model.
– A DomainClassConverter helps to resolve an repository instance from request parameters or path variables.
– HandlerMethodArgumentResolver is helper for resolving Pageable and Sort instances from request parameters.

[Continue reading…] “Spring JPA Web Support”

How to configure Apache Log4j2 with Spring Boot

Apache Log4j2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many of the improvements available in Logback while fixing some inherent problems in Logback’s architecture.The tutorial will introduce way to configure Log4j2 with Spring Boot

Related Posts:
Logging with SLF4J
Logging with SLF4J and Logback

[Continue reading…] “How to configure Apache Log4j2 with Spring Boot”

Spring Bean Life Cycle – Callback Interface, Custom Method, Annotation, Aware Interface

Spring Bean Life Cycle is very important because in many applications, we want to create some operations before initializing a Bean or make some operations before bean’s destruction.

This tutorial introduce four ways to control life cycle events of a Bean.

[Continue reading…] “Spring Bean Life Cycle – Callback Interface, Custom Method, Annotation, Aware Interface”