Java Records in JPA/Spring Data: Challenges and Usecases
Java records cannot be used as the replacement for JPA entities because they restrict the byte code manipulation, generally required by frameworks to work.
Java records cannot be used as the replacement for JPA entities because they restrict the byte code manipulation, generally required by frameworks to work.
Java ArrayList is part of the collection framework and implementation of resizable array data structure. Learn when to use array and arraylist.
Java ArrayList does not publicly expose the length of the backing array, and only the count of the stored elements can be retrieved using its size() method.
Learn to sort Java ArrayList in ascending and descending order using ArrayList.sort(), Collections.sort(), Comparator interface and Java 8 Streams.
Learn the conversion of decimal to hexadecimal and using converting hex to decimal in Java using the built-in APIs and custom methods.
Learn about Spring @PathVariable and @RequestParam annotations and compare them with Jakarta’s @PathParam and @QueryParam annotations.
Starting Spring Framework 6.1 and Sring Boot 3.2, we can use the Spring RestClient for performing HTTP requests using a fluent and synchronous API. The RestClient works over the underlying HTTP client libraries such the JDK HttpClient, Apache HttpComponents, and others. As the name suggests, RestClient offers the fluent API design …
Learn to create Jasper reports in a Spring boot application, step by step, by configuring JasperReport library, loading the report templates, fill the data into reports and finally export the filled reports into a variety of formats.
Learn what is pattern, and record patterns in detail along with how they help in pattern matching for instanceof and switch statements.
Since Java 21, we can use unnamed classes and instance main methods that allow us to bootstrap a class with minimal syntax.
The new sequenced collection interfaces allow adding, retrieving, and removing elements at either end of the collection, along with a reverse-ordered view of it.
Learn the differences between Sourcepath, Classpath and Buildpath and how they contribute to an application’s development, build and deployment phases.
This article discusses the new developer features in Java 21 including Virtual Threads, Unnamed classes, Sequenced Collections and Record Patterns.
These Java puzzles and their solutions will help in the next Java Interview. The key to solving these puzzles is to come up with an efficient algorithm. and write clean code.
Learn to get started with Python Pandas library and using Pandas for data visualization, manipulation including advantages and limitations.
Learn to create a Kafka Streams application using Spring Boot. Also, learn about Topology and Processor and unit test the topology design.
Learn to use Spring CrudRepository and ListCrudRepository interfaces, their differences and the changes made in Spring Data 3.0 with examples.
Learn to write a REST API in Spring Boot that can handle single file and multiple file uploads. Also learn to validate the file sizes and types.
Learn to configure the Java compiler version in a Maven project and a Spring boot application using Maven as a build tool.
Learn to configure the logging levels for different packages and classes in a Spring boot application using properties, YAML and XML configurations.
Spring Security framework supports a wide range of authentication models, and in this tutorial, we will cover OAuth2 authentication using Amazon Cognito. We will walk through a step-by-step guide from creating the user pool in the AWS, adding the app client, and configuring it in the Spring Boot application. 1. …
Learn to build REST APIs in a Spring boot application with request validation, error handling, testing and API documentation with examples.
Vaadin is a Java framework that simplifies front-end development by providing a rich set of reusable UI components and layouts. In this Spring Boot and Vaadin tutorial, we will explore the process of developing a basic CRUD application. 1. Goals Our goal is to construct a user interface that includes …
Learn to configure Spring boot application and Apache Kafka Producer, and Consumer, handle Kafka errors and retry in case of failures.
Learn the core concepts of configuring role-based authorization in Spring Security 6 and implementing authorization in a Spring Boot application.
In TypeScript, the default and optional parameters provide a convenient way to APIs with variable number of arguments with sensible defaults.
Typescript array slicing creates a new array containing shallow copies of the selected elements from the source array without modifying the source array.
Learn to design and implement a Spring Boot REST API that accepts long-running tasks and publishes the execution progress to a Kafka topic.
Spring @KafkaListener and @KafkaHandler annotations provide convenient ways to consume and handle messages from Kafka topics.
Learn to configure KafkaAdmin with custom properties, and create new topics in the Kafka cluster using AdminClient.createTopics() with example.
Learn the basics of KafkaTemplate, configure KafkaTemplate with custom properties, and configure producer and consumer factories with examples.
Learn to fix the selenium WebDriver error “This version of ChromeDriver only supports Chrome version” during UI testing.
Learn about top 5 template engines for Spring MV applications, comparing their features and setup process, to make more informed decisions.
Learn to fix Maven invalid target release error which indicates that Java versions used in Maven and in the application are not compatible.
Learn to call OpenAI ChatGPT APIs in Spring Boot RestTemplate or WebClient with an example. Also, log the requests and responses for debugging.
Learn to configure, modify and deploy a single-node and a multi-node setup of Apache Kafka using Docker Compose. Also, learn to create topics.
Learn the most common solutions for the Spring boot application closing automatically after start, with exit code 0 and no exceptions logs.
Since Spring Boot 3.1, @ServiceConnection is used to provide connection details to a remote service that takes precedence over details in the properties file.
Learn to use Redis Streams in a Spring Boot application to implement simple, in-memory and real-time stream processing of messages/events.
Learn to use Spring boot docker compose module, customize the compose file and container lifecycle with an example.
Learn the fundamentals of working with S3 buckets and objects using Spring Cloud AWS library and its S3Client and S3Template classes.
The Map.computeIfAbsent() method computes the mapped value for a key using a mapping function if the specified key does not exist in the Map or is mapped to a null value. It has been added as the default method in the Map interface in Java 8. 1. When to Use the computeIfAbsent() …
If you’re preparing for a job interview, these Spring security interview questions will help you understand key concepts and increase the confidence.
Learn to connect to Redis from Spring Boot, customize default config and perform cache operations using StringRedisTemplate / RedisTemplate.
Learn to use Redis Pub/Sub with Spring Boot Data, and configure the message publishers and subscribers (listners) for a given channel topic.
Learn to use the search API provided by Keycloak to search for users by ID, email, username, custom attributes, and role.
Learn to use integrate DynamoDB using Spring-cloud-aws module and its DynamoDbTemplate and DynamoDbEnhancedClient beans with examples.
After WebSecurityConfigurerAdapter was first deprecated and then removed in Spring Security 6, this tutorial will help in migrating to the latest version.
In Spring security tutorial, learn how it works under the hood, concepts of authentication, authorization, access control and basic configurations.
Java concurrency interview guide lists frequently asked questions for beginners and experienced programmers to help refresh multi-threading concepts.
HowToDoInJava provides tutorials and how-to guides on Java and related technologies.
It also shares the best practices, algorithms & solutions and frequently asked interview questions.