Articles

In this tutorial, we are going to try out a Spring Boot Swagger-enabled REST project and explore how the validation constraints can be utilized automatically for enriching Swagger models.

We are going to refer to https://www.baeldung.com/swagger-2-documentation-for-spring-rest-api and https://spring.io/guides/gs/rest-service/ as starting points.

Source de l’article sur DZONE

You can build a custom skill for Alexa by extending a servlet that accepts requests from and sends responses to the Alexa service in the cloud.

This project will walk through how to build an Alexa Skill with Spring Boot and Http Servlet mapping examples.

Source de l’article sur DZONE

Monitoring production is an important part of a software service provider. Many companies providing monitoring systems for maintaining the production environment. Spring Boot comes with different awesome modules that developers can easily configure and maintain development and production environments with. The actuator module provides production-ready features by which we can easily maintain the production environment. The actuator exposes JMX and HTTP endpoints.

Features

  • Endpoints: Spring Boot Actuator provides some default endpoints by which we can access application information. We can also monitor the production environment with those endpoints. Endpoints can also be accessed by third-party monitoring tools.
  • Metrics: We can access OS and JVM related information using spring boot actuator endpoints. This is very useful for runtime environment. Spring boot actuator provides this feature by integrating with micrometer application monitoring.
  • Audit: Spring Boot Actuator publishes events to  AuditEventRepository. Spring security by default publishes “authentication success,” “failure,” and “access denied” exceptions. This is a very useful feature for reporting and authentication failures. Auditing can be enabled by AuditEventRepository. By default, spring-boot provides InMemoryAuditEventRepository for auditing which has limited capabilities.
  • HTTP Tracing: Spring boot actuator also provides an HTTP tracing facility. If you want to use it you have to include web endpoint. Http tracing provides the information about request-response exchange.

Important Endpoints

Spring Boot Actuator provides the listed HTTP and JMX endpoint. We will discuss in detail later part of this article.

Source de l’article sur DZONE

HTTPS is a secure version of HTTP designed to provide Transport Layer Security (TLS) [the successor to Secure Sockets Layer (SSL)], the padlock icon in the address bar that establishes an encrypted connection between a web server and a browser. HTTPS encrypts every data packet to transmit in a secure way and protects sensitive data from an eavesdropper or hacker.

You can implement HTTPS by installing the SSL certificates on your web application. You can use either certificate issued by trusted Certificate Authorities (CA) or Self-Signed Certificate.

Source de l’article sur DZONE

This is already the third article that describes how to test asynchronous operations with the Byteman framework in an application using the Spring framework. The article focuses on how to do such testing with the JUnit 5 library.

The previous article focused on how such testing could be done with the usage of the JUnit 4 library (first article) and Spock framework (second article).

Source de l’article sur DZONE

Docker is powerful and simple to use. Docker allows developers to create portable, self-contained images for the software they create. These images can be reliably and repeatably deployed. You can get a lot of value out of Docker very easily, but to get the most out of Docker there are some concepts that are important to understand. How you build your Docker image has a measurable impact when you are doing continuous integration and continuous delivery. In this article, I will focus on how to take a more efficient approach to building Docker images for Spring Boot applications when doing iterative development and deployment. The standard approach has some drawbacks so here we look at what they are and how to do it better.

Key Docker Concepts

There are four key Docker concepts at play: images, layers, the Dockerfile and the Docker cache. Simply put, the Dockerfile describes how to build the Docker image. An image consists of a number of layers. The Dockerfile starts with a base image and adds on additional layers. A new layer is generated when new content is added to the image. Each layer that is built is cached so it can be re-used on subsequent builds. When a Docker build runs, it will re-use any existing layers that it can from the cache. This reduces the overall time and space needed for each build. Anything that has changed, or has not been built before, will be built as needed.

Source de l’article sur DZONE

Spring, work your magic!

Auto-configuration is probably one of the most important reasons why you would decide to use frameworks like Spring Boot. Thanks to that feature, it is usually enough just to include an additional library and override some configuration properties to successfully use it in your application.

Source de l’article sur DZONE


Intro

BULL (Bean Utils Light Library) is a Java-bean-to-Java-bean transformer that recursively copies data from one object to another. It is generic, flexible, reusable, configurable, and incredibly fast.
It’s the only library able to transform Mutable, Immutable, and Mixed beans without any custom configuration.

This article explains how to use it, with a concrete example for each feature available.

Source de l’article sur DZONE


Learn how to develop a custom Spring Cloud Stream binder from scratch.

Spring Cloud Stream is a framework built on top of Spring Boot and Spring Integration that is designed to build event-driven microservices communicating via one or more shared messaging systems.

The core Spring Cloud Stream component is called Binder,” a crucial abstraction that’s already been implemented for the most common messaging systems (e.g. Apache Kafka, Kafka Streams, Google PubSub, RabbitMQ, Azure EventHub, and Azure ServiceBus).

Source de l’article sur DZONE

I am very excited to share my experiences building Continuous Integration/Continuous Delivery (CI/CD) into Spring-Boot-based Java applications. First, let’s establish everything we will learn in this tutorial: 

Step 1) Create a Spring Boot Java App using Spring Initializr

Source de l’article sur DZONE