ActiveMq – Explicitly configure Spring ActiveMq ConnectionFactory with SpringBoot

In the past tutorial, we had learned how to start a Spring JMS ActiveMQ application with auto-configured ConnectionFactory by SpringBoot.
But in the software development, there’re many cases that we need to override the ContainerFactory, so How to do it? JavaSampleApproach makes the tutorial to guide how to explicitly configure Spring ActiveMQ ConnectionFactory.

Related posts:
How to use Spring JMS with ActiveMQ – JMS Consumer and JMS Producer | Spring Boot
How to start Spring Kafka Application with Spring Boot
Spring Jms ActiveMq – How to send Java object messages to ActiveMQ server (specially with Bi-Directional relationship Java objects)
ActiveMq – How to work with Spring JMS ActiveMq Topic (Publisher-Subcribers pattern) using SpringBoot

[Continue reading…] “ActiveMq – Explicitly configure Spring ActiveMq ConnectionFactory with SpringBoot”

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”

Reactor – Simple Ways to create Flux/Mono

Reactive Streams is an API and pattern that provides a standard for asynchronous stream processing with non-blocking back pressure. It is also being introduced in Java 9 Flow API with four simple interfaces: Publisher, Subscriber, Subscription and Processor.

But Reactive Streams API is just low level to make practical use in reactive applications. So Reactor Core provides two main implementations of Publisher: Flux and Mono. In this tutorial, we’re gonna know what they are and simple ways to create them.

[Continue reading…] “Reactor – Simple Ways to create Flux/Mono”

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 @JsonView to serialize/de-serialize and customize JSON format from Java Object.

In the tutorial, JavaSampleApproach shows you how to use the @JsonView annotation of Jackson library to serialize/de-serialize Java objects and customize the fields of JSON view.

Related articles:
Jackson to convert Java Object to/from Json String
Integrate Spring RestAPIs with @JsonView
How to resolve Json Infinite Recursion problems when working with Jackson

[Continue reading…] “How to use @JsonView to serialize/de-serialize and customize JSON format from Java Object.”

Java Sort List of Objects with Comparable

This tutorial shows you way to Sort List of Objects using Comparable example.

Related Post: Java Sort List of Objects with Comparator

How to do this with Kotlin: Sort List of Objects with Comparable

[Continue reading…] “Java Sort List of Objects with Comparable”

Java Sort List of Objects with Comparator

This tutorial shows you way to Sort List of Objects by implementing Comparator example.

Related Post: Java Sort List of Objects with Comparable

How to do this with Kotlin: Sort List of Objects with Comparator

[Continue reading…] “Java Sort List of Objects with Comparator”

Spring JPA + MySQL + AngularJS example | Spring Boot

In this tutorial, JavaSampleApproach shows you a Spring Boot example that uses Spring JPA to interact with MySQL and AngularJS as a front-end technology to make request and receive response.

Related Posts:
How to use Spring JPA with MySQL | Spring Boot
How to integrate Http Angularjs with Spring MVC | Spring Boot
Angular 4 + Spring JPA + MySQL example | Angular 4 Http Client – Spring Boot RestApi Server

[Continue reading…] “Spring JPA + MySQL + AngularJS example | Spring Boot”

Spring JPA + PostgreSQL + AngularJS example | Spring Boot

In this tutorial, JavaSampleApproach shows you a Spring Boot example that uses Spring JPA to interact with PostgreSQL and AngularJS as a front-end technology to make request and receive response.

Related Posts:
How to use Spring JPA with PostgreSQL | Spring Boot
How to integrate Http Angularjs with Spring MVC | Spring Boot
Angular 4 + Spring JPA + PostgreSQL example | Angular 4 Http Client – Spring Boot RestApi Server

[Continue reading…] “Spring JPA + PostgreSQL + AngularJS example | Spring Boot”

Consume Spring HATEOAS Rest API using AngularJS example | Spring Boot

In this tutorial, JavaSampleApproach shows you a Spring Boot example that consumes Spring HATEOAS Rest API using AngularJS.

Related Post:
How to start Spring HATEOAS RestAPI with Spring Boot
Consume Spring HATEOAS Rest API using JQuery Ajax example | Spring Boot
How to integrate Http Angularjs with Spring MVC | Spring Boot

[Continue reading…] “Consume Spring HATEOAS Rest API using AngularJS example | Spring Boot”

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
SpringData MongoDB GridFsTemplate to save, retrieve, delete binary files (Image, Text files)

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

Consume Spring HATEOAS Rest API using JQuery Ajax example | Spring Boot

In this tutorial, JavaSampleApproach shows you a Spring Boot example that consumes Spring HATEOAS Rest API using JQuery Ajax.

Related Post: Spring HATEOAS Rest API + JQuery Ajax POST/GET example | Spring Boot

[Continue reading…] “Consume Spring HATEOAS Rest API using JQuery Ajax example | Spring Boot”

Spring HATEOAS Rest API + JQuery Ajax POST/GET example | Spring Boot

In this tutorial, JavaSampleApproach shows you a Spring Boot example that uses Spring HATEOAS Rest API with JQuery Ajax.

Related Posts:
How to start Spring HATEOAS RestAPI with Spring Boot
How to integrate JQuery Ajax POST/GET & Spring MVC | Spring Boot
How to start with JSP page and static resources in Spring Boot
Consume Spring HATEOAS Rest API using JQuery Ajax example | Spring Boot

[Continue reading…] “Spring HATEOAS Rest API + JQuery Ajax POST/GET example | Spring Boot”

How to query alter domain models by Spring JPA Projection – SpringBoot + MySQL database

When you query with Spring Data, normally the results are full domain models. But in various cases, we need to alter the returned data with another view by customized fields, how to do it?
-> In the tutorial, JavaSampleApproach will show a solution to modify returned domain model by Spring JPA Projection.

Related articles:
How to configure Spring JPA One to One Relationship – SpringBoot

[Continue reading…] “How to query alter domain models by Spring JPA Projection – SpringBoot + MySQL database”

Spring Boot – CORS Support using XML Config

In previous post, we have created a REST Service with Global CORS Configuration using Java Config. This tutorial will introduce way to define global CORS configuration out of our Controller with XML Config in Spring Boot example.

Related Articles:
Spring CORS example using @CrossOrigin – Spring Boot
Spring Boot – CORS Support using Java Config

[Continue reading…] “Spring Boot – CORS Support using XML Config”

Spring Boot – CORS Support using Java Config

In previous post, we have created a REST Service with Spring CORS integration using @CrossOrigin. This tutorial will introduce way to define global CORS configuration out of our Controller with Java Config in Spring Boot example.

Related Articles:
Spring CORS example using @CrossOrigin – Spring Boot
Spring Boot – CORS Support using XML Config

[Continue reading…] “Spring Boot – CORS Support using Java Config”