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.”

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

[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

[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 MongDB

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 MongDB”

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”

Spring CORS example using @CrossOrigin – Spring Boot

Cross-Origin-Resource-Sharing (CORS) is a W3C specification which defines how a browser should be allowed using script to access different origin than the origin it has been served. With CORS, we can specify what kind of cross domain requests are authorized in a flexible way, instead of using some less secured and less powerful hacks like IFRAME or JSONP. In this tutorial, we’re gonna look at way to create a Spring Boot REST service with Spring CORS integration using @CrossOrigin annotation.

Related Articles:
Spring Boot – CORS Support using Java Config
Spring Boot – CORS Support using XML Config

[Continue reading…] “Spring CORS example using @CrossOrigin – Spring Boot”

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 HATEOAS RestAPI with Spring Boot

Spring HATEOAS project helps to create REST representations that follow HATEOAS (Hypertext as the Engine of Application State) principle. In this article, we’re gonna look at way to build a Rest Service using Spring HATEOAS with Spring Boot.

[Continue reading…] “How to start Spring HATEOAS RestAPI 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”