Quantcast
Channel: Java Archives - Java Code Geeks
Browsing all 743 articles
Browse latest View live

Check Logs In A Spock Test Example

Logging is a crucial part of application development and testing. It helps track the flow of execution and debug issues effectively. When writing tests, especially with Spock (a testing framework for...

View Article


Hibernate Envers – Extending Revision Info with Custom Fields

Hibernate Envers provides automatic auditing of entity changes in Hibernate-based applications. By default, Envers tracks entity modifications with revision numbers and timestamps. However, in many...

View Article


Profiling Java Apps with Flight Recorder & Mission Control

Modern Java applications often face performance challenges that are difficult to diagnose in production environments. High CPU usage, memory leaks, inefficient garbage collection, and thread contention...

View Article

Project Loom vs. Traditional Threads: Java Concurrency Revolution

Concurrency has always been a cornerstone of modern software development, enabling applications to handle multiple tasks simultaneously. In Java, traditional threading models have been the go-to...

View Article

Hugging Face Models With Spring AI and Ollama Example

Ollama provides a lightweight way to run LLM models locally, and Spring AI enables seamless integration with AI models in Java applications. Let us delve into understanding Spring AI, Ollama, and...

View Article


Working With Reactive Kafka Stream and Spring WebFlux

In modern application development, the need for real-time data processing and reactive programming has become increasingly important. Reactive programming allows developers to build non-blocking,...

View Article

Advanced Java Performance Tuning for Low-Latency Systems

In the realm of high-performance computing, low-latency applications are critical for industries such as finance, gaming, and real-time data processing. Java, with its robust ecosystem and mature...

View Article

Quarkus vs. Spring Boot: Performance and Developer Experience Compared

In the world of cloud-native Java development, Quarkus and Spring Boot have emerged as two of the most popular frameworks. Both aim to simplify the creation of modern, scalable applications, but they...

View Article


Java JDBC executeQuery() DML Error Resolution

In Java JDBC, executing SQL statements incorrectly can lead to runtime errors, such as the common exception Cannot issue data manipulation statements with executeQuery(). Let us delve into...

View Article


PostgreSQL Hibernate 6 JSON Example

1. Introduction Hibernate 6 enhances the Object-Relational Mapping(ORM) framework by supporting JSON Data types. In this example, I will create a PostgreSQL Hibernate 6 JSON data example that uses...

View Article

Java Records vs. Kotlin Data Classes: Choosing the Best for Immutable Data

Immutable data structures are a cornerstone of modern software development, offering benefits like thread safety, predictability, and simplified debugging. In the Java ecosystem, two popular tools for...

View Article

Spring Boot Centralize HTTP Logging Example

Effective logging is essential for debugging, monitoring, and maintaining applications. Let us delve into understanding how Spring Boot can centralize HTTP logging and how it helps track requests,...

View Article

Java Run Class Within WAR In CLI

When deploying a Java web application, the code is packaged into a WAR (Web Application Archive) file and typically deployed in a servlet container like Tomcat, Jetty, or WildFly. However, there may be...

View Article


Java-Powered Smart Contracts: Building with Hyperledger Fabric

Java and Blockchain: Building Smart Contracts with Hyperledger Fabric” is an exciting topic for developers looking to explore blockchain technology and decentralized applications (dApps). Hyperledger...

View Article

Java Serialization Alternatives: Kryo, Protobuf, and Avro Compared

Java’s built-in serialization mechanism is a convenient way to convert objects into byte streams for storage or transmission. However, it is often criticized for its inefficiency, lack of...

View Article


Understanding Maven Predefined Properties

Maven is a widely used build automation tool that helps manage project dependencies, compile code, package applications, and run tests. One of the powerful features of Maven is predefined properties,...

View Article

OpenCV-Based Media Java Swing Viewer

Let’s create an OpenCV-Based Media Viewer using Java‘s Swing framework (hereafter referred to as Swing). Learn how to read and render media, including images (PNG, JPEG), videos (MP4, AVI), and webcam...

View Article


Java Caching Showdown: Ehcache vs. Caffeine vs. Hazelcast

Caching is a critical technique for improving the performance of Java applications by reducing latency and minimizing the load on backend systems. With numerous caching libraries available, choosing...

View Article

Java and Distributed Systems: Implementing Raft Consensus Algorithm

Distributed systems are at the heart of modern applications, enabling scalability, fault tolerance, and high availability. One of the key challenges in distributed systems is achieving consensus among...

View Article

Read Response Body in JAX-RS Client from a POST Request

JAX-RS (Jakarta API for RESTful Web Services) is a widely used framework for building RESTful web services in Java. It provides a client API that allows us to interact with RESTful services. When...

View Article
Browsing all 743 articles
Browse latest View live