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
AngularJs CrossSite HTTP Requests to SpringBoot RestAPIs

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

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 start working with SQLite database in Windows

SQLite is one of the top ranking databases in the world. It’s a self-contained, serverless and zero-configuration database engine. So in the tutorial, JavaSampleApproach will guide how to start working with SQLite database in Windows.

[Continue reading…] “How to start working with SQLite database in Windows”