Home » Java » Enterprise Java

Enterprise Java

Dependency management and Maven

Maven is great and mature. There is always a solution on almost everything. The main case you might stumble on organisation projects is dependency management. Instead of each project having it’s own dependencies you want a centralised way to inherit those dependencies. In those case you declare on the parent prom the managed dependencies. In my example I just want ...

Read More »

Kafka – Exactly-Once Semantics

java-interview-questions-answers

In distributed environment failure is a very common scenario that can be happened any time. In the Kafka environment, the broker can crash, network failure, failure in processing, failure while publishing message or failure to consume messages, etc. These different scenarios introduced a different kind of data loss and duplication. Failure scenarios A (Ack Failed): Producer published message successfully with retry>1 ...

Read More »

Maven Tutorial For Selenium Test Automation

While working on a project for test automation, you’d require all the Selenium dependencies associated with it. Usually these dependencies are downloaded and upgraded manually throughout the project lifecycle, but as the project gets bigger, managing dependencies can be quite challenging. This is why you need build automation tools such as Maven to handle them automatically. Maven can be more ...

Read More »

Spring boot custom banner generation

spring-interview-questions-answers

Whenever we start a Spring Boot application a text message shown below is displayed . This is called as a banner. Now, wouldn’t it be wonderful if we could create a custom banner which is specific to our Spring Boot application and use it instead of default Spring Boot banner. There are many ways to generate and use spring boot ...

Read More »

AWS DynamoDB version field using AWS SDK for Java 2

spring-interview-questions-answers

It is useful to have a version attribute on any entity saved to anAWS DynamoDB database which is simply a numeric indication of the number of times the entity has been modified. When the entity is first created it can be set to 1 and then incremented on every update.  The benefit is immediate – an indicator of the number ...

Read More »

Spring Boot Port Change To Custom or New Port From Default

spring-interview-questions-answers

A quick guide to change the port for Spring Boot application. Examples to server.port property in application.properties file and yml file. And also from Command Line Arguments, @SpringBootApplication, WebServerFactoryCustomizer 1. Introduction In this tutorial, You’ll learn how to change the port in Spring Boot application. Spring Boot by default does many auto configurations and provides the ways to customize as ...

Read More »

Using Testcontainers in Spring Boot Tests For Database Integration Tests

spring-interview-questions-answers

In this blog post I’d like to demonstrate how I integrate Testcontainers in Spring Boot tests for running integration tests with a database. I’m not using Testcontainers’ Spring Boot modules. How it works with them, I will show in a separate blog post. All samples can be found on GitHub. Why Testcontainers? Testcontainers is a library that helps to integrate infrastructure ...

Read More »

Neo4J OGM with Quarkus

In the following video I show an example Quarkus application that uses a Neo4J database and Neo4J OGM. Have a look at the example project on GitHub. I’ve created an example domain for coffee beans with certain flavor profiles that we can query and match. The red nodes are coffee beans that are from a certain country and taste like ...

Read More »