Home » Java » Enterprise Java » Page 4

Enterprise Java

Spring Web MVC

spring-interview-questions-answers

Spring MVC is a web framework based on the model–view–controller pattern. It is based on the Spring principles and supports a wide range of server-side rendering technologies as JSP, Thymeleaf, Groovy, among others. Dispatcher Servlet It is a front controller that coordinates all the request handling activities. Delegates to the web infrastructure beans and invokes the user’s web components. It ...

Read More »

Testing Expected Exceptions with JUnit 5

This post shows how to test for expected exceptions using JUnit 5. If you’re still on JUnit 4, please check out my previous post. Let’s start with the following class that we wish to test: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 public class Person {   private final ...

Read More »

Code Generation in CUBA: What makes the magic

Introduction Code generation is a common thing in modern frameworks. There may be different reasons behind introducing code generation – from getting rid of boilerplate code to reflection replacement and creating complex solutions based on domain-specific languages. Like every technology, code generation has application areas and limitations. In this article, we will have a look at code generation usage in ...

Read More »

Kafka & Zookeeper for Development: Zookeeper Ensemble

java-interview-questions-answers

Previously we spun up Zookeeper and Kafka locally but also through Docker. What comes next is spinning up more than just one Kafka and Zookeeper node and create a 3 node cluster. To achieve this the easy way locally docker-compose will be used. Instead of spinning up various instances on the cloud or running various Java processes and altering configs, ...

Read More »

REST: Sorting collections

java-interview-questions-answers

When building a RESTful API we often want to give consumers the option to order collections in a specific way (e.g. ordering users by last name). If our API supports pagination this can be quite an important feature. When clients only query a specific part of a collection they are unable to order elements on the client. Sorting is typically ...

Read More »

Stylish API

java-interview-questions-answers

In this blog post we are going to look at the new styling and other new options available in OpenAPI and SwaggerUI Quarkus (v1.10.0 +). Styling Default style The default style for Swagger UI has changed from the vanilla Swagger UI to a Quarkus branded page: In this post we mostly focus on Swagger UI, but the styling options also ...

Read More »