WebSocket – Create Spring WebSocket Application with SpringBoot + SockJS + STOMP

The WebSocket protocol provides new capability for web applications: full-duplex, two-way communication. So in the system where the client and server need to exchange data at high frequency and with low latency, WebSocket is the best solution. That is the reason for us to create a Spring WebSocket Application with JavaSampleApproach.

[Continue reading…] “WebSocket – Create Spring WebSocket Application with SpringBoot + SockJS + STOMP”

How to resolve Json Infinite Recursion problem when working with Jackson

Json Infinite Recursion is one of the most common problems when we serialize Java objects which having Bidirectional-Relationships. So in the tutorial JavaSampleApproach will guide you how to smoothly handle the problems with Jackson annotations: @JsonIgnore, @JsonView, {@JsonManagedReference, @JsonBackReference} and @JsonIdentityInfo.

Related articles:
Jackson to convert Java Object to/from Json String
Integrate Spring RestAPIs with @JsonView
How to use @JsonView to serialize/de-serialize and customize JSON format from Java Object

[Continue reading…] “How to resolve Json Infinite Recursion problem when working with Jackson”

Integrate Spring RestAPIs with @JsonView

In the previous post, We had learned how to use @JsonView to serialize/de-serialize Java objects. Now we go to next step, JavaSampleApproach shows you how to integrate Spring RestAPIs with @JsonView to customize views and resolve infinity loop problem.

Related posts:
How to use @JsonView to serialize/de-serialize and customize JSON format from Java Object.
How to resolve Json Infinite Recursion problems when working with Jackson

[Continue reading…] “Integrate Spring RestAPIs with @JsonView”

How to use SpringData MongoRepository to interact with MongoDB

In the past post, we had learned how to work with MongoDB by MongoOperations which supports a set of standard APIs to manipulate data. So in the tutorial, JavaSampleApproach will show a powerful tool SpringData MongoRepository with flexible and more complex APIs to interact with MongoDB.

Related articles:
Spring MongoOperations to access MongoDB
How to build SpringBoot MongoDb RestfulApi

[Continue reading…] “How to use SpringData MongoRepository to interact with MongoDB”

How to use Spring Kafka JsonSerializer (JsonDeserializer) to produce/consume Java Object messages

In the previous post, we had setup a Spring Kafka Application succesfully by explicitly configuration Kafka Factories with SpringBoot. But the messages had been used have String type. While in the development, POJO (Plain Old Java Object) are often used to construct messages. So with the tutorial, JavaSampleApproach will show how to use Spring Kafka JsonSerializer (JsonDeserializer) to produce/consume Java Object messages.

Related Articles:
How to start Spring Kafka Application with Spring Boot
How to start Spring Apache Kafka Application with SpringBoot Auto-Configuration

[Continue reading…] “How to use Spring Kafka JsonSerializer (JsonDeserializer) to produce/consume Java Object messages”

How to start Spring Kafka Application with Spring Boot

The Spring Apache Kafka (spring-kafka) provides a high-level abstraction for Kafka-based messaging solutions. And in the previous post, We had developed a Spring Kafka Application with the auto-configuration supported by SpringBoot (from version 1.5). But when we need explicitly configure Kafka factories (Kafka Producer and Kafka Consumer) for development, how to do it? So in the tutorial, JavaSampleApproach will introduce an alternative solution by manually configure Kafka factories to build a Spring Kafka Application.

Related Articles:
How to start Apache Kafka
How to start Spring Apache Kafka Application with SpringBoot Auto-Configuration
How to use Spring Kafka JsonSerializer(JsonDeserializer) to produce/consume Java Object messages
How to create Spring RabbitMQ Producer/Consumer application with SpringBoot

[Continue reading…] “How to start Spring Kafka Application with Spring Boot”

How to start Spring Apache Kafka Application with SpringBoot Auto-Configuration

The Spring Apache Kafka (spring-kafka) provides a high-level abstraction for Kafka-based messaging solutions. And Spring Boot 1.5 includes auto-configuration support for Apache Kafka via the spring-kafka project. So in the tutorial, JavaSampleApproach will guide how to start Spring Apache Kafka Application with SpringBoot.

Related Articles:
How to start Apache Kafka
How to start Spring Kafka Application with Spring Boot
Spring JMS – Explicitly Configure Spring ActiveMQ ConnectionFactory | SpringBoot

[Continue reading…] “How to start Spring Apache Kafka Application with SpringBoot Auto-Configuration”

How to start Apache Kafka

Apache Kafka is an open-source for distributed streaming system. We can use it as a Messaging System, a Storage System or Stream Processing. So in the tutorial, JavaSampleApproach will show you the first step to quick start with Apache Kafka.

Related Articles:
How to start Spring Kafka Application with Spring Boot
How to start Spring Apache Kafka Application with SpringBoot Auto-Configuration

[Continue reading…] “How to start Apache Kafka”

How to configure Spring Security to access H2 database console in Spring Boot project

In the previous post, We had set-up a SpringBoot project to develop with H2 database. But if you enable Spring Security in your project, the H2 database console will be blocked with 403 error. So in the tutorial, JavaSampleApproach will show you how to make configuration for resolving the Access Denied problem.

[Continue reading…] “How to configure Spring Security to access H2 database console in Spring Boot project”

Integrate H2 database with SpringBoot & Spring JPA in Embedded mode

H2 database is a pure Java, open source and very fast engine. We can use H2 for development, testing and performance benchmarking. So in the tutorial, JavaSampleApproach will show how to integrate H2 database with SpringBoot and Spring JPA in Embedded mode.

[Continue reading…] “Integrate H2 database with SpringBoot & Spring JPA in Embedded mode”

How to use Angular HttpClient to POST, PUT, DELETE data on SpringBoot Rest APIs – Angular 4

With previous posts, we had done 2 important things: fetching data from remote server by Angular HttpClient, and navigate among views by Angular Routing.

In this tutorial, we’ll go to next step – work with Rest APIs: How to use Angular HttpClient to POST, PUT & DELETE data on SpringBoot RestAPI Services.

Related Articles:
How to work with Angular Routing – Spring Boot + Angular 4
How to use Angular Http Client to fetch Data from SpringBoot RestAPI – Angular 4

[Continue reading…] “How to use Angular HttpClient to POST, PUT, DELETE data on SpringBoot Rest APIs – Angular 4”

How to work with Angular Routing – Spring Boot + Angular 4

In the previous post, We made a big step, our Angular Application can exchange data with a remote server. But up to now, we don’t have any mention on Angular navigations. So in the tutorial, JavaSampleApproach will guide how to navigate among the views with Angular Routing.

Related articles:
How to use Angular Http Client to fetch Data from SpringBoot RestAPI – Angular 4
How to integrate Angular 4 with SpringBoot Web App and SpringToolSuite
How to use Angular HttpClient to POST, PUT, DELETE data on SpringBoot Rest APIs – Angular 4

[Continue reading…] “How to work with Angular Routing – Spring Boot + Angular 4”

How to use Angular Http Client to fetch Data from SpringBoot RestAPI – Angular 4

In the previous post, we had introduced Angular Service (Angular 4 Service) but we did it with a mock data solution. So in the tutorial, JavaSampleApproach will show you how to use Angular HTTP Client inside Angular Service to fetch data from SpringBoot RestApi.

Related articles:
How to develop with Angular Service (Angular 4 Service)
How to integrate Angular 4 with SpringBoot Web App and SpringToolSuite
How to work with Angular Routing – Spring Boot + Angular 4
How to use Angular HttpClient to POST, PUT, DELETE data on SpringBoot Rest APIs – Angular 4

[Continue reading…] “How to use Angular Http Client to fetch Data from SpringBoot RestAPI – Angular 4”

Create a new Angular 4 Component – Multiple Components Angular Application

The previous post, We had introduced how to set up an Angular 4 App with SpringBootSuite. In the tutorial, JavaSampleApproach will show you how to create a new Angular 4 Component and build an Angular Application with multiple Components.

Related articles:
How to integrate Angular 4 with SpringBoot Web App and SpringToolSuite

[Continue reading…] “Create a new Angular 4 Component – Multiple Components Angular Application”

How to create Activiti Event Listener with Spring Boot Example

Activiti provides event mechanism that allows us to get notified when various events occur within the engine. In this tutorial, we’re gonna look at an example that uses Activiti Event Listener with Spring Boot.

Related Posts:
Introduction to Activiti – a Java BPM Engine
Activiti Message Event with Spring Boot Example

[Continue reading…] “How to create Activiti Event Listener with Spring Boot Example”

How to create Activiti Message Event with Spring Boot Example

In this tutorial, we’re gonna look at Activiti Message Event Example with Spring Boot.

Related Articles:
Introduction to Activiti – a Java BPM Engine
Activiti Message Event with Spring Boot Example

[Continue reading…] “How to create Activiti Message Event with Spring Boot Example”