Articles


Introduction

Security is one of the most important aspects of modern-day applications. As technology keeps getting advanced, keeping the security up-to-date is a challenge. How awesome would it be to find top trending articles in the Security Zone in one place so that you can always stay up to date with the latest trends in technology? We dug into Google analytics to find the top 10 most popular Security articles in August. Let’s get started!

10. Spring Boot Security + JWT  »Hello World » Example

Spring Boot applications have been a key in implementing the microservice architecture. Learn how to implement security in Spring Boot with JWT token. Follow the step-by-step tutorial and secure your Spring Boot microservice.

Source de l’article sur DZONE


Infographic.

Add Sleuth, RabbitMQ, and Zipkin in Spring Cloud Project

This article assumes that you know how to set up a spring cloud or spring boot project; also, the RabbitMQ and ElasticSearch servers are ready.

Add the dependencies in maven pom.xml:

Source de l’article sur DZONE

As we all know the Cloud-based systems are becoming the most popular architecture in the software engineering world, and the most famous and beloved Cloud platform among developers is Spring Cloud.

Spring Cloud has some important features which are given in the following parts and the feature part does a specific job:

Source de l’article sur DZONE

In this article, I am going to be talking about how we can define your event-driven architectures using the AsyncAPI definition.

Introduction

A while ago, I published an article about how you can document REST APIs using Open API 3 specification. This was for synchronous APIs.

Source de l’article sur DZONE

This is the third article of the series. The first article is about integrating Bing Maps with Angular and Spring Boot with Jpa. The second article is about adding a new shape to the map and storing it in the Spring Boot backend.

This article is about removing properties of a map with a modal panel to confirm and delete it in the database. The project AngularAndSpringWithMaps is used as an example. To remove a property the property has to be clicked on.

Source de l’article sur DZONE


Introduction

While developing applications using Spring batch, especially in a micro-service project, we sometimes face one or most of the following cases:

  • The necessity of getting the security context inside the batch items to call methods that require authorizations inside the same micro-service or perform remote processing by calling other micro-services using Feign Client (HTTP) or  Spring Cloud Stream (broker like Kafka, RabbitMq …)
  • Propagating Sleuth trace Id and span Id in order to enhance logs traceability inside all the application components including other micro-services so the trace will not be lost if we use Job.
  • Getting the connected user Locale (i18n) in order to generate internationalized output otherwise, all the Job outputs will be generated in the default server language.
  • Retrieving objects stored inside Mapped Diagnostic Context  (MDC) for tracing purposes.

The following schema illustrates remote calls that can be performed in a micro-service-based application and the context information that String Batch items can propagate.

Source de l’article sur DZONE

The microservice architecture pattern, which is used widely across tech companies large and small, enables businesses to distribute functionality between many small applications, instead of larger monolithic portions. Each piece has a specifically defined task, along with communications and other services, usually via a REST API channel. The benefits of utilizing a microservice architecture include, but are not limited to: 

  • Simple development and maintenance of applications: developers and teams are able to focus on one application rather than multiple, with the benefit of faster development, and fewer hitches (such as bug and easy to miss errors) in the larger project. 

    Source de l’article sur DZONE

I was facing a problem where I wanted to insert millions of records into the database, which needed to be imported from the file.

So, I did some research around this, and I would like to share with you what I found which helped me improve the insert records throughput by nearly 100 times.

Source de l’article sur DZONE

Let’s say that we have a UserController class with two GET endpoints:

  • /users/{id} endpoint, which returns a User object for a given id
  • /users endpoint, which returns List<User>
Java

 

xxxxxxxxxx
1

26

1

public class User {

2


3

    private Integer id;

4

    private String name;

5

    private Date dateOfBirth;

6

    private String city;

7

    

8

    // constructors, getters & setters are ignored

9

}

10


11

@RestController

12

public class UserController {

13

    

14

    @Autowired

15

    UserService userService;

16

    

17

    @RequestMapping(value = "/user/{id}", method= RequestMethod.GET)

18

    User getUser(@PathVariable("id") String id){

19

        return userService.getUser(id);

20

   }

21

    

22

    @RequestMapping(value = "/users", method= RequestMethod.GET)

23

    List<User> getAllUsers(){

24

        return userService.getAllUsers();

25

   }

26

}

Source de l’article sur DZONE