Explore the reasons behind the “Not a Managed Type” Exception in Spring Data JPA.
Also find me here:
Baeldung Editor
David Martinez
David is a Software Engineer with over 10 years of working experience in different industries. Lately, his focus is on cloud-based Java applications. He plays guitar when not coding.
Here's what I've reviewed (so far):
Baeldung on Java
- All
- Testing (19)
- Java (18)
- Spring (15)
- Spring Data (14)
- Spring Boot (13)
- Maven (10)
- Java Concurrency (10)
- REST (9)
- Java IO (9)
- Reactive (8)
- NoSQL (8)
- Spring Web (7)
- Spring MVC (7)
- Java Streams (7)
- DevOps (7)
- Core Java (7)
- Security (6)
- Persistence (6)
- Java Collections (6)
- JVM (6)
- Java String (5)
- JPA (5)
- Architecture (5)
- XML (4)
- Spring Security (4)
- Spring Persistence (4)
- Java Dates (4)
- Java Array (4)
- JSON (4)
- Guava (4)
- Data (4)
- Java Map (3)
- Jackson (3)
- Docker (3)
- Java Numbers (2)
- Jakarta EE (2)
- IDE (2)
- HTTP Client-Side (2)
- Gradle (2)
- Web Services (1)
- Spring Cloud (1)
- Series (1)
- Networking (1)
- Logging (1)
- Java Web (1)
- Algorithms (1)
Download File from S3 Given a URL
Filed under DevOps
Learn how to download a file from S3 given a URL with Java and AWS SDK.
PrintWriter write() vs print() Method in Java
Filed under Java IO
Discover the differences between PrintWriter’s write() and print() methods.
Iterator vs forEach() in Java
Filed under Java Collections
Learn how to navigate through collections and arrays using the Iterator inteface and forEach() method.
How to Get Last Record in Spring Data JPA
Filed under Spring Data
Explore different ways of getting the last record in Spring Data JPA.
Reactor WebFlux vs Virtual Threads
Filed under Reactive
Compare the Java 19’s virtual threads to Project Reactor’s Webflux.
Creating a Kafka Listener Using the Consumer API
Filed under Data
Learn how to create a Kafka listener and consume messages from a topic using Kafka’s Consumer API.
Verify That Lambda Expression Was Called Using Mockito
Filed under Testing
Learn how to test if our code calls a lambda function by using Mockito.
HttpSecurity vs. WebSecurity in Spring Security
Filed under Spring Security
In this tutorial, we learn the difference between HttpSecurity and WebSecurity in Spring.
Working With HarperDB and Java
Filed under NoSQL
Discover Java’s support for HarperDB, a high-performing flexible NoSQL database with the power of SQL.
How to Sort LinkedHashMap by Values in Java
Filed under Java Map
Explore how to sort a LinkedHashMap by values in Java.
Modify Request Body Before Reaching Controller in Spring Boot
Filed under Spring Boot
Learn how to modify an HTTP request before it reaches the controller in a Spring Boot application.
Asserting Nested Map With JUnit
Filed under Testing
Learn the different ways of asserting the presence of a nested map with JUnit.
Synchronize a Static Variable Among Different Threads
Filed under Java Concurrency
Learn several ways to synchronize access to static variables among different threads.
Unreachable Statements in Java
Filed under Java
Learn about unreachable statements in Java.
Bill Pugh Singleton Implementation
Filed under Architecture
Learn to implement the Bill Pugh Singleton pattern.
Modifying Objects Within Stream While Iterating
Filed under Java Streams
Discover the common mistakes made while modifying the elements in a Java Stream and the correct way to do it.
Compare StringBuilder Objects in Java
Filed under Java String
Learn how to compare two StringBuilder objects in Java releases before and after Java 11.
A Guide to OpenRewrite
Filed under Maven
Learn the basics of the OpenRewrite, a library to for managing Maven dependencies.
A Guide to Spring 6 JdbcClient API
Filed under Spring Persistence
Learn about the JdbcClient interface, the latest addition to Spring Framework 6.1.
Retry Logic with CompletableFuture
Filed under Java Concurrency
Learn how to apply retry logic to CompletableFuture objects.
Arrays mismatch() Method in Java
Filed under Java Array
Learn about the Arrays mismatch() method.
HttpSecurity vs. WebSecurity in Spring Security
Filed under Spring Security
Explore and discover the differences between HttpSecurity and WebSecurity.
Spring Boot 3.1’s ConnectionDetails Abstraction
Filed under Spring Boot
Learn about the ConnectionDetails interface in Spring Boot 3.1.
Wrapping a String After a Number of Characters Word-Wise
Filed under Java String
Learn to wrap a sentence automatically after a given number of characters.
How to Reuse Testcontainers in Java
Learn how to reuse Testcontainers when setting up the environment for local development and testing.
Using zipWhen() With Mono
Filed under Reactive
Explore how to use zipWhen() to combine the results of two or more Mono streams in a coordinated manner.
Truncate a Double to Two Decimal Places in Java
Filed under Java Numbers
Learn to truncate a double to two decimal places in Java.
Difference Between permitAll() and anonymous() in Spring Security
Filed under Spring Security
Learn about the methods permitAll() and anonymous() of the class HttpSecurity from Spring Security Framework.
Merge Two Arrays and Remove Duplicates in Java
Filed under Java Array
Explore various methods of merging the contents of two arrays and eliminating the duplicates.
Check if Letter Is Emoji With Java
Filed under Java String
Discover multiple Java methods for detecting emojis in a string.
How to Replace Deprecated jdbcTemplate.queryForObject and jdbcTemplate.query in Spring Boot 2.4.X and above
Filed under Spring Persistence
Laern about the deprecated queryForObject() and query() methods of JdbcTemplate and their preferred counterparts.
Constructing Java Objects From Only the Class Name
Filed under Java
Explore the process of creating Java objects using their class names.
Mock Same Method with Different Parameters
Filed under Testing
Learn how to mock a method in Java to receive different responses based on the parameters passed in.
Closing Java IO Streams
Filed under Java IO
Learn why it’s necessary to close IO streams and how to do it.
Maven Multi-Module Project Coverage With Jacoco
Filed under Maven
Learn how to build a Maven multi-module project with Jacoco coverage.
Detect Security Vulnerabilities with Snyk
Filed under Security
Explore the security features offered by Snyk and how to use it in a Java project.
Convert Between Java LocalDate and Epoch
Filed under Java Dates
Learn how to convert from Java’s LocalDate to Epoch and vice versa.
Built-in Testcontainers Support in Spring Boot
Filed under Testing
Learn about the enhanced Testcontainers support introduced in Spring Boot 3.1.
How To Rename Files and Folders in Amazon S3
Filed under DevOps
Discover how to rename an object (file or folder) in an Amazon S3 bucket using Java.
How to Check if a Value Exists in a JSON Array for a Particular Key
Filed under JSON
Learn how to inspect a JSON array and check if it contains a particular key-value pair.
bootstrap-server in Kafka Configuration
Filed under Data
Learn what bootstrap-server is in Kafka Configuration.
How to Speed Up Maven Build
Filed under Maven
Learn how to speed up Maven builds.
How to Get First Item From a Java Set
Filed under Java Collections
Learn how to get the first item from a Java Set.
Difference Between Future, CompletableFuture, and Rxjava’s Observable
Filed under Java Concurrency, Reactive
Discover the difference between Future, CompletableFuture, and Rxjava’s Observable.
Fail Maven Build if JUnit Coverage Falls Below Certain Threshold
Filed under Maven
Learn how to cause a Maven build to fail when the JaCoCo code coverage falls below a given threshold.
Consuming Page Entity Response From RestTemplate
Filed under REST
Discover how to use RestTemplate to invoke a RESTful endpoint and read the response of type Page.
How to Get Notified When a Task Completes in Java Executors
Filed under Java Concurrency
Learn several options for receiving notifications on the completion of a task depending on how you’re running it.
CompletableFuture allOf().join() vs. CompletableFuture.join()
Filed under Java Concurrency
Explore CompletableFuture.allOf() method and the differences between it and calling join() on multiple separate CompletableFuture instances.
CompletableFuture and ThreadPool in Java
Filed under Java Concurrency
Learn about Java’s CompletableFuture and the thread pool it leverages.
Starting the Maven Build From the Point Where It Failed
Filed under Maven
Learn how to resume a Maven build after failure.
Need for Default Constructor in JPA Entities
Filed under JPA
Learn about the JPA requirement for a default no-argument constructor in an Entity class.
Throw Exception for Unexpected Input for Enum With MapStruct
Filed under Java
Learn how to map one enum to another with MapStruct.
Read Date in Java Using Scanner
Filed under Java Dates
Learn how to read a Date from a Scanner.
Matching Null With Mockito
Filed under Testing
Learn how to use Mockito to check if null is passed as an argument to a method.
Resolving Mockito Exception: Wanted But Not Invoked
Filed under Testing
Learn how to resolve Mockito Exception: Wanted But Not Invoked.
@JsonMerge Annotation in Jackson
Filed under Jackson
Discover how to use the @JsonMerge annotation from the Jackson Java library.
How Many Days Are There in a Particular Month of a Given Year?
Filed under Java Dates
Learn how to find the number of days in a particular month of a given year when programming in Java.
Replacing Variables in a Document Template with Java
Filed under Java IO
Learn how to replace a pattern in various locations of a Word document.
Understanding JPA/Hibernate Associations
Filed under JPA
Learn about the differences between unidirectional and bidirectional associations in JPA/Hibernate.
Correct Use of flush() in JPA
Filed under JPA
Learn about the Spring JPA’s flush() method .
Solving Gson Parsing Errors
Filed under JSON
Learn about some common Gson errors and how to fix them.
Converting List to Page Using Spring Data JPA
Filed under Spring Data
Learn how to convert a List into a Page using Spring Data JPA.
Object.toString() vs String.valueOf()
Filed under Java String
Discover the differences between the String.valueOf() and Object.toString() methods.
Execute a Method Only Once in Java
Filed under Java
Discover different approaches to executing a method only once.
Hibernate Natural IDs in Spring Boot
Filed under Spring Data
Learn about the @NaturalId annotation and how to use and implement it in a Spring Boot project.
Find the Longest Word in a Given String in Java
Filed under Java String
Learn how to find the longest words in a sentence.
StaleElementReferenceException in Selenium
Filed under Testing
Learn what a StaleElementReferenceException in Selenium is and why it occurs.
Buffer Overflows in Java
Discover what Buffer Overflow is and the threats it poses to our system.
Load Testing Rest Endpoint Using Gatling
Filed under Testing
Learn how to use Gatling to do performance testing on any Rest endpoint.
JetBrains @Contract Annotation
Filed under IDE
Learn how to use the JetBrains @Contract annotation.
Difference Between Fluent Interface and Builder Pattern in Java
Filed under Java
Discover the differences between the fluent interface design pattern and the builder pattern.
New CRUD Repository Interfaces in Spring Data 3
Filed under Spring Data
Discover the new repository interfaces introduced in Spring Data 3.
Moving Items Around in an Arraylist
Filed under Java Collections
Learn three different ways of moving items around in an ArrayList.
API First Development with Spring Boot and OpenAPI 3.0
Filed under Spring Boot
Discover API-First Development using Spring Boot and Open API Specification 3.0.
Anemic vs. Rich Domain Objects
Filed under Architecture
Explore the differences between anemic and rich domain models in Java.
Migrate Application From Spring Boot 2 to Spring Boot 3
Filed under Spring Boot
Learn how to migrate a Spring Boot application to Spring Boot 3.
Accessing Private Constructor in Java
Filed under Core Java
Learn why and how to use a private constructor for a class in Java.
Spring Data Repositories – Collections vs. Stream
Filed under Java Collections, Java Streams, Spring Data
Learn when to use a List and when to use a Stream with Sping Data.
JUnit 5 @Nested Test Classes
Filed under Testing
Learn about JUnit 5’s @Nested annotation.
Determine if a Class Implements an Interface in Java
Filed under Core Java
Learn several ways to determine if an object or a class implements a specific interface.
Extracting a Custom Header From the Request
Filed under Spring Web
Learn various ways of extracting the request headers for a Spring application.
RxJava Single.just() vs Single.fromCallable()
Filed under Reactive
Learn two popular ways of creating a Single object in RxJava.
Java Generics PECS – Producer Extends Consumer Super
Filed under Java Collections
Explore the usage of Java Generics when it comes to producing and consuming collections.
Running Spring Boot Applications with the Embedded Camunda Engine
Filed under Spring Boot
Learn how to leverage the embedded Camunda engine into the Spring Boot application.
Object Validation After Deserialization
Filed under Jackson
Learn how to use Java’s Validation API to validate objects after deserialization.
Get Information About a PDF in Java
Filed under Java IO
Learn different ways of getting information about a PDF file using the iText and PDFBox libraries in Java.
Finding Max Date in List Using Streams
Filed under Java Dates, Java Streams
Learn how to find the maximal date in a list of objects using Streams.
How to Check if All Runnables Are Done
Filed under Java Concurrency
Learn how to check if runnable objects are done.
Uploading a File and JSON Data in Postman
Filed under JSON, Spring Web
Learn how to upload files and JSON data when using Postman.
Editing Existing PDF Files in Java
Filed under Java IO
Learn how to edit the content of an existing PDF file in Java.
Comparison Between Mono’s doOnNext() and doOnSuccess()
Filed under Spring Web
Learn about various listeners’ options of the Mono object from Spring 5 WebFlux.
Patterns for Iterating Over Large Result Sets With Spring Data JPA
Filed under Spring Data
Learn various ways of iterating through large data sets retrieved with Spring Data JPA.
Differences Between Paths.get and Path.of
Filed under Java IO
Learn about the similarities and differences between the methods Paths.get() and Path.of().
TriFunction Interface in Java
Filed under Java
Find out how TriFunction interface works for functional programming in Java.
Basic Authentication With Postman
Filed under Web Services
Learn how to use Postman to test an endpoint secured with Basic Authentication.
Java Program to Find the Roots of a Quadratic Equation
Filed under Algorithms
Learn how to find the solutions of a quadratic equation in Java.
How to Fix Git “Refusing to Merge Unrelated Histories”
Filed under DevOps
Learn how to fix the “Refusing to Merge Unrelated Histories” error in Git.
Swagger: Specify Two Responses with the Same Response Code
Filed under Spring Web
Learn how to write an API specification that returns two different objects for the same response code using Java and Swagger.
Java 8 Streams: Multiple Filters vs. Complex Condition
Filed under Java Streams
Let’s compare different ways of filtering Java Streams.
Using Environment Variables in Spring Boot’s Properties Files
Filed under Spring Boot
Learn how to use environment variables in Spring Boot’s application.properties.
Filter Java Stream to 1 and Only 1 Element
Filed under Java Streams
Learn two methods from Collectors to retrieve the unique element which matches a certain predicate in a given stream of elements.
Validate an XML File Against an XSD File
Filed under XML
Learn how to validate an XML file against an XSD file.
Guide to Creating Jar Executables and Windows Executables from Java
Filed under Java
Learn how to package a Java program into a Jar and make them executable in Windows.
Java 14 Record vs. Lombok
Filed under Core Java
Learn the differences and similarities between Java 14 Records and Lombok.
JavaScript Function Call with Thymeleaf
Filed under Spring MVC
Learn how to call JavaScript functions in a Thymeleaf template.
Get Domain Name From Given URL in Java
Filed under Networking
Learn different ways to get a domain name from a given URL in Java.
What Is the JDK com.sun.proxy.$Proxy Class?
Filed under Core Java
Explore how JDK’s $Proxy class works.
Configure MongoDB Collection Name for a Class in Spring Data
Filed under NoSQL, Spring Data
Learn how to configure MongoDB collection names for classes using Spring Data.
Java Scanner useDelimiter with Examples
Filed under Java IO
Learn how to use the useDelimiter method of the Scanner class.
Serialize a Lambda in Java
Filed under Java
Learn how to serialize a lambda expression and its underlying mechanism.
Generate a Random Value From an Enum
Filed under Java
Learn how to generate a random value from an enum.
Illegal Character Compilation Error
Filed under Java
Learn about the Illegal Character Compilation Error and how to avoid it.
Java HttpClient Basic Authentication
Filed under HTTP Client-Side
Learn how to configure the Java HttpClient for basic authentication and how it works.
Hibernate’s “Not-Null Property References a Null or Transient Value” Error
Filed under Persistence
Learn about Hibernate’s PropertyValueException. In particular, the “not-null property references a null or transient value” error message.
Java 9 Illegal Reflective Access Warning
Filed under Java
Learn about Java 9 illegal reflective access warning
BootstrapMode for JPA Repositories
Filed under JPA
Learn the different types of BootstrapMode for JPA repositories.
Get the Number of Rows in a ResultSet
Filed under Persistence
Learn the different ways of counting the number of rows of a JDBC ResultSet.
Set List of Objects in Swagger API Response
Filed under REST
Learn how to modify the Swagger API response to deliver a list of objects.
How to Invert a Map in Java
Filed under Java Map
Learn different options to invert a Map in Java.
JDBC Connection Status
Filed under Persistence
In this article, we’ll discuss some aspects of the JDBC connection status.
What Is the Difference Between NIO and NIO.2?
Filed under Java IO
Understand Java IO functionalities and how they changed throughout different Java versions.
Find All Jars Containing Given Class
Filed under Java
In this article, we’ll learn to find all the jars containing a particular class.
Guide to JBang
Filed under DevOps
Learn how to create, edit and run self-contained source-only or binary Java programs with ease using JBang.
Speed up Spring Boot Startup Time
Filed under Spring Boot
Learn different configurations and setups that can help decrease Spring Boot startup time.
415 Unsupported MediaType in Spring Application
Filed under Spring MVC
In this tutorial, we’re going to showcase the causes and resolutions of the HTTP response code 415 Unsupported MediaType for POST requests in a Spring Application.
Quarkus Bean Discovery With Jandex Indexing
Filed under DevOps
In this article, we’ll learn the difference between bean discovery in Quarkus and classic Jakarta EE environments.
Assert That an Object Is From a Specific Type
Filed under Testing
In this article, we’ll explore how we can verify that an object is of a specific type. We’ll be looking at different testing libraries and what methods they offer to assert the object type.
Solving Certificate Store Errors in JVM
Filed under JVM
In this tutorial, we’ll take a look at common issues we might encounter when issuing SSL requests.
Spring Webflux and @Cacheable Annotation
In this article, we’ll explain how Spring WebFlux interacts with @Cacheable annotation
New Features in Java 17
Filed under Core Java
In this article, we’ll talk about the news related to the new version of the Java ecosystem, Java SE 17 – the new features and the changes in its release process, LTS support, and licenses.
How to Get Docker-Compose to Always Use the Latest Image
Filed under Docker
In this tutorial, we’ll check out several options to ensure that docker-compose always uses the latest images of the applications.
Securing SOAP Web Services With Keycloak
Filed under Security
In this tutorial, we’ll learn how to leverage Keycloak to authenticate and authorize SOAP web services using OIDC
Parallel Test Execution for JUnit 5
Filed under Testing
In this article, we’ll cover how to execute parallel unit tests using JUnit 5.
Generate a WAR File in Maven
Filed under Maven
In this tutorial, we’re going to consider the usage of the Maven WAR plugin with a Java EE application.
Introducing KivaKit
Filed under Architecture
In this article, we’ll explore the design of KivaKit as a collection of “mini-frameworks” that work together. In addition, we’ll take a look at the essential features of each mini-framework.
Upload a File with WebClient
In this article, we’ll use WebClient – a non-blocking, reactive HTTP client – to illustrate how to upload a file.
Connecting to a Specific Schema in JDBC
Filed under Persistence
In this article, we’ll cover the basics of database schemas, why we need them, and how they are useful. After that, we’ll focus on practical examples of setting schema in JDBC with PostgreSQL as a database.
Javadoc: @version and @since
Filed under Java
In this tutorial, we’ll focus on the @version and @since tags in Javadoc.
Test WebSocket APIs With Postman
In this article, we’ll create an application with WebSocket and test it using Postman.
Configuring Kafka SSL Using Spring Boot
Filed under Security, Spring Boot
In this tutorial, we’ll cover the basic setup for connecting a Spring Boot client to an Apache Kafka broker using SSL authentication.
Custom Serializers in Apache Kafka
In this tutorial, we’ll see how to implement Kafka default format converters and custom serializers for specific use cases.
Diagnosing a Running JVM
Filed under JVM
In this article, we’ll see how we can diagnose a running JVM with ease.
Default Values for Maven Properties
Filed under Maven
In this short article, we’ll go through how to configure Maven properties default values, and how to use them.
Pub-Sub vs. Message Queues
Filed under Architecture
In this tutorial, we’ll look at the use of message queues and publishers/subscribers. These are common patterns used in distributed systems for two or more services to communicate with one another.
The java.lang.NoClassDefFoundError in JUnit
In this article, we’ll understand why the java.lang.NoClassDefFoundError occurs in JUnit and how to fix it.
Command Line Arguments as Maven Properties
Filed under Maven
In this short tutorial, we’ll look at how we can pass arguments to Maven using the command line.
Kafka Topic Creation Using Java
Filed under Data
In this tutorial, we’ll briefly introduce Apache Kafka and then see how to programmatically create and configure topics in a Kafka cluster.
Feign Logging Configuration
Filed under Logging, Spring Boot
In this tutorial, we’ll describe how we can enable Feign client logging in our Spring Boot application.
Returning an Auto-Generated Id with JPA
Filed under JPA
In this tutorial, we’ll discuss how we can handle auto-generated ids with JPA.
When to Use a Parallel Stream in Java
Filed under Java Streams
In this tutorial, we’ll explore the differences between sequential and parallel streams using Stream Api.
Convert a Java Enumeration Into a Stream
Filed under Java Streams
In this short tutorial, we’re going to implement a utility method for converting Enumeration objects to the Java Stream API
Introduction to Alibaba Sentinel
Filed under Spring Cloud, Spring Web
In this tutorial, we’ll have a look at some of Sentinel’s main features. Further, we’ll see an example of how to use it, its annotation support, and its monitoring dashboard.
Backpressure Mechanism in Spring WebFlux
Filed under Reactive
In this tutorial, we’ll explain what it is and how to apply backpressure mechanism in Spring WebFlux to mitigate it.
Clearing the Maven Cache
Filed under Maven
In this short tutorial, we’ll explore ways to clear our local Maven cache.
REST API: JAX-RS vs Spring
Filed under Jakarta EE, REST, Spring
In this tutorial, we’ll see the difference between JAX-RS and Spring MVC for REST API development.
Java HashMap Load Factor
Filed under Java Map
In this article, we’ll see the significance of the load factor in Java’s HashMap and how it affects the map’s performance.
How to Analyze Java Thread Dumps
Filed under DevOps, Java Concurrency
Learn how to analyze thread dumps to efficiently diagnose performance issues. Also, we’ll learn to detect bottlenecks or even simple bugs.
How to Convert a Hibernate Proxy to a Real Entity Object
Filed under Persistence, Spring
In this tutorial, we’ll learn how to convert a Hibernate proxy to a real entity object
Scheduled WebSocket Push with Spring Boot
Filed under Spring Boot
In this tutorial, we’ll see how to send scheduled messages from a server to the browser using WebSockets.
InvalidAlgorithmParameterException: Wrong IV Length
Filed under Security
In this tutorial, we’ll describe how to avoid InvalidAlgorithmParameterException when we generate the IV and use it in a cipher algorithm.
Comparing Doubles in Java
Filed under Guava, Java Numbers
In this tutorial, we’ll talk about the different ways of comparing double values in Java.
Reusing Docker Layers with Spring Boot
Filed under Docker, Spring Boot
In this tutorial, we’ll see how to exploit the new capabilities of Spring Boot to reuse Docker layers.
Maven Packaging Types
Filed under Maven
In this article, we explore the different packaging types available in Maven.
How to Stop Execution After a Certain Time in Java
Filed under Java Concurrency
Learn different ways to end a long-running execution after a certain time in Java.
Reading an HTTP Response Body as a String in Java
Filed under HTTP Client-Side, REST, Spring
Explore several options for reading an HTTP response body as a string in Java
Guide to the Gradle Wrapper
Filed under Gradle
In this tutorial, we’ll learn about Gradle Wrapper, an accompanying utility that makes it easier to distribute projects.
CharacterEncodingFilter In SpringBoot
Filed under Spring Boot
Learn about the CharacterEncodingFilter and its usage in a Spring Boot application.
Reducing JSON Data Size
In this tutorial, we’ll look at various ways of reducing the size of JSON in our Java applications.
Dates in OpenAPI Files
Filed under Spring Web
Let’s see how to declare dates in an OpenAPI file, in this case, implemented with Swagger.
Hiding Endpoints From Swagger Documentation in Spring Boot
Filed under REST, Spring Boot, Spring Web
Let’s have a look at how we can hide endpoints from Swagger API documentation.
Leadership Election With Consul
Filed under Architecture, DevOps
Let’s see how Leadership Election with Consul helps to ensure data stability.
NoSuchMethodError in Java
Filed under Java
Let’s look at the java.lang.NoSuchMethodError and some ways to handle it.
How to Define a Map in YAML for a POJO?
Filed under Spring
We’ll walk through how we can use properties defined in a YAML file to configure values for a Map in our POJO classes.
List All Classes Loaded in a Specific Class Loader
Filed under JVM
List all the classes loaded by a specific class loader in Java
A Guide to Concurrent Queues in Java
Filed under Java Concurrency
A quick, high-level look at the Concurrent Queues in Java.
Probability in Java
Filed under Java
We’ll look at a few examples of how we can implement probability with Java.
How to Disable Spring Security Logout Redirects
Filed under Security, Spring Security
Take a close look at how to disable logout redirects in Spring Security.
Difference Between request.getSession() and request.getSession(true)
Filed under Java Web
Understand the difference between calling HttpServletRequest#getSession() and HttpServletRequest#getSession(boolean).
Skipping Tests With Gradle
In this short tutorial, we’ll see how to skip tests when using the Gradle build tool.
Comparing Arrays in Java
Filed under Java Array
Have a look at different ways to compare arrays in Java.
Using Mockito ArgumentCaptor
Filed under Testing
In this tutorial, we’ll cover a common use case of using Mockito ArgumentCaptor in our unit tests.
Performance Effects of Exceptions in Java
Filed under JVM
Java exceptions are considered expensive and shouldn’t be used for flow control. This tutorial will prove that this perception is correct.
Difference Between Statement and PreparedStatement
Filed under Java, Persistence
Explore the differences between JDBC’s Statement and PreparedStatement interfaces.
Finding Top K Elements in a Java Array
Filed under Java Array
implement different solutions to the problem of finding the k largest elements in an array with Java
Memory Layout of Objects in Java
Filed under JVM
Learn how the JVM lays out objects and arrays in the heap
Spring MVC Tutorial
Filed under Spring MVC
Spring MVC configuration – both Java and XML – on a simple Spring MVC project.
Intro to XPath with Java
A quick and practical intro to working with XPath with the help of the standard Java libraries.
Introduction to WireMock
A quick and practical guide to stubbing REST APIs with WireMock.
Introduction to Spring REST Docs
This article introduces Spring REST Docs, a test-driven mechanism to generate documentation for RESTful services that is both accurate and readable.
File Upload with Spring MVC
Filed under Spring MVC
In this article, we focus multipart (file upload) support in Spring MVC web applications.
XStream User Guide: Converting XML to Objects
Filed under XML
This article demonstrates how to use XStream to deserialize XML to Java objects.
Introduction to Jooq with Spring
Filed under Spring Persistence
Learn how to set up and use Jooq (jOOQ Object Oriented Querying) with the Spring Framework.
XStream User Guide: Converting Objects to XML
Filed under XML
In this tutorial, we will learn how to use the XStream library to serialize Java objects to XML.
Elasticsearch Queries with Spring Data
Filed under NoSQL, Spring Data
Learn how to use the various query types offered by Elasticsearch and understand field analyzers and their impact on search results.
PubSub Messaging with Spring Data Redis
Filed under NoSQL, Spring Data
Learn how to do the implementation of pub/sub messaging using Spring Data Redis.
Exploring SpringMVC’s Form Tag Library
Filed under Spring MVC
A quick and to the point tutorial about the various tags that Spring MVC provides to help us create and validate forms.
Using Apache Camel with Spring
Filed under Spring
This article will demonstrate how to configure and use Apache Camel with Spring Framework through a simple, practical example.
Guava 19: What’s New?
Filed under Guava
Overview of the features introduced in Google Guava 19.
Introduction to Spring Data Redis
Filed under NoSQL, Spring Data
A quick and practical introduction to Spring Data Redis, which provides abstractions from the Spring Data platform for Redis.
Returning Custom Status Codes from Spring Controllers
Filed under Spring MVC
This article demonstrates two ways to return custom HTTP status codes from Spring MVC controllers: using ResponseEntity and using exceptions.
Introduction to Using FreeMarker in Spring MVC
Filed under Spring MVC
FreeMarker is a Java based template engine from the Apache Software Foundation. This tutorial illustrates how to configure FreeMarker for use in Spring MVC.
Injecting Mockito Mocks into Spring Beans
This article will show how to use dependency injection to insert Mockito mocks into Spring Beans for unit testing.
Java – Try with Resources
Filed under Core Java
A quick and practical guide to how we can use the try-with-resources functionality introduced in Java 7 to auto-close resources and simplify our syntax.
Guava 18: What’s New?
Filed under Guava
Overview of the features introduced in Google Guava 18.
Using the CassandraTemplate from Spring Data
Filed under NoSQL, Spring Data
A primer on using Spring Data Cassandra’s CassandraTemplate to perform basic queries using QueryBuilder and CQL.
Introduction to Advice Types in Spring
Filed under Spring
A quick intro to AOP in Spring and working with Advice types to cross-cut across your application concerns.
Introduction to Pointcut Expressions in Spring
Filed under Spring
A quick and practical intro to Spring AOP and Pointcut Expressions.
Introduction to Spring Data Cassandra
Filed under NoSQL, Spring Data
A quick practical intro to using Spring Data Cassandra to cleanly store data in a Cassandra server.
Setting Up Swagger 2 with a Spring REST API Using Springfox
Learn how to document a Spring REST API using Swagger 2.
A Guide to XML in Java
A quick guide and overview of the XML landscape in the Java ecosystem.
Introduction to RAML – The RESTful API Modeling Language
Filed under REST
The definitive intro to RAML – the RESTful API Modeling Language.
Java Bean Validation Basics
Filed under Jakarta EE
Learn the basics of Java Bean validation, the common annotations and how to trigger the validation process.
Spring Bean Annotations
Filed under Spring
Learn how and when to use the standard Spring bean annotations – @Component, @Repository, @Service and @Controller.
GridFS in Spring Data MongoDB
Filed under NoSQL, Spring Data
A quick guide to interacting with GridFS using Spring Data MongoDB.
A Spring Custom Annotation for a Better DAO
Filed under Spring Persistence
A cool implementation of a custom Spring annotation along with a bean pre-processor to get to a simple, generic DAO implementation.
Filtering and Transforming Collections in Guava
Filed under Guava, Java Collections
Filter collections with Predicates and transform them with Functions using the Guava library.
How to Read a Large File Efficiently with Java
Filed under Java IO
Learn how to process lines in a large file efficiently with Java – no need to store everything in memory.
Mockito When/Then Cookbook
Filed under Testing
Mockito configure Behavior –
examples, usage and best practices.
Baeldung on Linux
- All
- Administration (81)
- Networking (53)
- Processes (23)
- Security (20)
- Files (13)
- Scripting (12)
- Filesystems (9)
- File Editing (9)
- File Searching (8)
- Web (7)
- Docker (7)
- Installation (5)
- File Compression (4)
- File Viewing (3)
- File Permissions (3)
- Search (1)
- File Conversion (1)
How to Log to Only Systemd Log Files in Linux
Filed under File Viewing
Explore how to capture system logs with only systemd-journald.
Get a Browser-Like Web Page HTML From the Command Line
Filed under Web
Learn to download web pages from the command line interface (CLI).
How to Echo Shell Commands as They Are Executed?
Filed under Scripting
Learn how to make Bash scripts echo commands before they’re executed.
Creating a Bootable USB Installer With UNetbootin
Filed under Administration
Learn how to create a bootable USB flash drive with UNetbootin.
How to Check the Current Keyboard Layout
Filed under Administration
Discover different tools to check the current keyboard layout.
iptables Chains and Tables Traversal in Linux
Filed under Networking
Learn about different tables and chains in the iptables command.
Installing and Configuring a TFTP Server on Linux
Filed under Installation, Networking
Learn how to install and configure a TFTP server in Linux.
Filtering Tabular Data Across Two Files
Filed under File Searching
Learn several command-line tools to compare text file tabular data on a Linux terminal.
Netcat for Sending Binary Data to an Established Connection
Filed under Networking
Learn how to send binary data to an established connection with Netcat.
How to Search for All Files Starting With a Specific String
Filed under File Searching
Learn how to find all files starting with a specific string.
Running a Script When Internet Connection Becomes Available
Filed under Administration, Networking
Learn two different methods in Linux that allow us to run scripts when the internet connection is available.
Finding the Power Consumption of a Machine in Linux
Filed under Administration
Discover how to check the power consumption of your Linux machine.
How to Run a Disk Check to Fix Bad Sectors
Filed under Administration, Filesystems
Learn how find and repair your disk’s bad sectors.
Configure Email Notifications for crontab
Filed under Administration
Learn how to configure email notifications for crontab on Linux systems.
Overview of Sandboxing Process in Linux
Filed under Administration, Processes
Learn different methods to execute untrusted processes in a safe, sandboxed environment.
Protection Against Port Scanners in Linux
Filed under Security
Learn how to configure Linux to prevent port scanners from identifying the kinds of services on ports in the system.
Combining the LOG and DROP Rules of iptables
Filed under Networking
Learn to combine LOG and DROP Rules of iptables.
Viewing a List of TLS/SSL Ciphers Offered by Clients
Filed under Security
Learn about TLS/SSL cipher suites and the different methods to obtain the list of client’s cipher suites.
Reattach to an Already Running Process
Filed under Processes
Learn how to reattach to an already running process in Linux.
Checking Redis Connection Without Using redis-cli
Filed under Networking
Learn how to check the Redis server connection without using the redis-cli command-line tool.
How to Check Unallocated Free Space of a Hard Disk in Linux
Filed under Filesystems
Explore different methods for checking unallocated free space on a hard disk.
Running GUI Applications in a Linux Docker Container
Filed under Docker
Learn how to run applications inside a Docker container and see its GUI.
UDP Socket Buffer in Linux
Filed under Networking
Learn about UDP sockets in Linux.
Creating a Wireless Access Point and Sharing Internet Using nmcli
Filed under Networking
Learn how to create a wireless access point using the nmcli command.
Access a Page That Requires Login From Another Page Using curl
Filed under Web
Explore how to use curl to access a page that requires login from another page.
Filtering Packets by MAC Address With tcpdump
Filed under Networking
Learn how to filter network packets by MAC address using the tcpdump command-line tool.
Capturing LLDP Packets Using tcpdump
Filed under Networking
Learn how to capture LLDP packets using the tcpdump command-line tools.
Adding Image into PDF File in Linux
Filed under File Editing
Learn how to insert an image file into a PDF file using the different GUI tools in Linux.
Comparison Between Snaps, Flatpak, and AppImage Packages
Filed under Installation
Learn about various containerized application packaging formats in Linux.
How to List and Remove the Last Added Packages in Linux
Filed under Installation
Learn two ways for listing and removing the latest packages installed.
Comparing tar Files in Linux
Filed under File Viewing
Learn several ways to compare the content of two tarballs.
Testing Disk Performance on Linux
Filed under Administration
Find out which metrics to check when measuring disk performance.
Dump Memory Image From a Linux System
Filed under Administration
Explore how to dump a memory image for forensic analysis.
Best Compression Softwares for Source Code Files in Linux
Filed under File Compression
Discover the best compression methods in Linux.
What Makes locate Faster Than find
Filed under File Searching
Learn about what makes locate faster than find in Linux.
Linux Software Packages and How Are They Different From Other OS Package Format
Filed under Administration
Learn about software packages in Linux.
Different Ways to Share Files Between Linux Machines Over a Network
Filed under Networking
Discover various ways to share files and folders in Linux over a network.
Checking the TLS Version Required by Host
Filed under Security
Learn how to check the required TLS version for a host in Linux.
Download and Extract Archive Without Saving Archive to Disk
Filed under Administration, Web
Learn various methods for downloading and extracting archives on the fly.
Testing an Internet Connection From Bash
Filed under Networking
Discover some commands for checking the internet connection.
Differences Between Drive, Partition, and Volumes in Linux
Filed under Administration
Learn about the differences between drives, partitions, and volumes in Linux.
Passively Monitor TCP Packet Loss in Linux
Filed under Networking
Explore how to passively monitor TCP packet loss in Linux.
Different Range of User IDs Value in Linux
Filed under Administration
Learn about the reserved user IDs in Linux.
Interrupt Handling in Linux
Filed under Processes
Learn about interrupt handling in Linux.
Buffer and Cache as Reported by the free Command
Filed under Administration
Learn how to use the free command to gain insights into the system’s memory utilization.
The Meaning of Different Colors of the htop Status Bar
Filed under Processes
Learn about the meaning of different colours displayed on the htop interactive screen status bar.
How to Create Automatically Expiring User Accounts?
Filed under Administration
Learn different ways of creating a temporary user in Linux.
Why Do We Need the fork System Call to Create New Processes?
Filed under Processes
Discover why we use the fork system call to create a child process.
Differences Between vmlinux, vmlinuz, vmlinux.bin, zimage, and bzimage
Filed under Administration
Discover various kernel images.
Forward HTTP Post Request via Rewrite
Filed under Web
Explore how to forward HTTP POST requests via rewrite in Nginx.
How to Invoke Shell Scripts on Mouse Events
Filed under Administration
Learn how to trigger shell scripts on mouse events.
How to Block Certain Websites From the /etc/hosts File
Filed under Networking
Learn how to prevent access to specific websites using the /etc/hosts file.
How Is bc Different From dc
Filed under Processes
Explore the differences between bc and dc calculators.
Switching User in Docker Image or Container
Filed under Docker
Learn how to switch users in a Docker image or container.
Can systemd Show How Many Times a Service Restarted?
Filed under Administration
Learn how to find out how many times a service has been restarted.
Waiting for Server Restart in Ansible
Filed under Administration, Networking
Learn how to pause a playbook and restart a server in Ansible.
Validating HAProxy Config Files
Filed under Administration
Learn how to validate the HAProxy config files using the haproxy command.
Speeding Up gzip Compression
Filed under File Compression
Learn how to speed up the compression of a file using some gzip options as well as some alternative tools.
How to List Namespaces in Linux
Filed under Administration
Learn how to list namespaces in Linux.
Docker Container Published Port Ignoring UFW Rules
Filed under Docker, Networking, Security
Learn about the issue where the Docker container’s published ports ignore the firewall rules.
Gzipped Files Content Comparison
Filed under File Compression
Learn how to check whether the content of two gzipped files is the same.
Pinging a Host Until It’s Alive
Filed under Networking
Learn how to ping a host until it gets alive.
What Are the Default and Most Common Terminal Encodings in Linux?
Filed under Security
Learn what character encoding is and how it’s used.
Block Access of a Process to the Network
Filed under Security
Learn how to restrict the running environment of untrusted applications using Linux namespace and sandboxing.
Prevent Apache From Serving a Specific Directory
Filed under Security
Learn how to prevent the Apache2 web server from serving particular directories.
The Linux hash Command
Filed under Scripting
Learn about the Linux hash command.
How to Check HDD/SSD Temperature in Linux
Filed under Administration
Discover how to read HDD (Hard Disk Drive) and SSD (Solid-State Drive) temperatures from the Linux command line.
What Is Metadata and How Does It Aid in the fsck Process?
Filed under Files
Learn about metadata and how to display it with fsck in Linux.
Shredding Files in Linux Using the shred Command
Filed under Files
Discover how to wipe a file completely from the disk.
What Happens to the Processes When Memory Gets Short in Linux
Filed under Administration, Processes
Learn about memory management in Linux and one very interesting feature: memory overcommitting.
Memory-Mapped File Versus Anonymous Memory
Filed under Processes
Learn about memory-mapped files and anonymous memory in Linux.
What’s the Difference Between fdisk and parted
Filed under Filesystems
Discover the difference between the fdisk and parted commands.
How to Get and Set the Volume Level Using the Command Line
Filed under Administration
Learn how to get and set the volume level from the command line.
The Differences Between BRE, ERE, and PCRE Syntax in Linux
Filed under File Editing, File Searching
Learn the differences among the different flavors of regular expressions, such as BRE, ERE, and PCRE in Linux.
Displaying the Execution Tree of systemd
Filed under Administration
Learn how to display execution trees, hierarchies, and dependencies of the services running on Linux.
The /etc/resolv.conf File
Filed under Administration, Networking
Discover the /etc/resolv.conf file and which aspects of DNS it can configure.
Flattening a Nested Directory in Linux
Filed under Files
Learn different ways of flattening a nested directory in Linux.
The Pipe Buffer Capacity in Linux
Learn what pipe buffer capacity is and how to find it in Linux.
Difference Between systemctl mask and systemctl disable
Filed under Administration
Learn how to control processes using systemd.
How to Use Serial Ports on Linux Without Root
Filed under Networking
Learn how to configure non-root serial port access.
Detecting All Computers Connected to a Network
Filed under Networking
Learn different ways to detect devices connected to the network you’re connected to.
Show Surrounding Lines Using Grep Command in Linux
Filed under File Searching
Learn how we can use grep to get information around a matched string.
Difference Between IP Address 127.0.0.1 and 0.0.0.0
Filed under Networking
Learn the difference between the IP addresses 127.0.0.1 and 0.0.0.0.
How to Get the Netmask From an IP Address
Filed under Networking
Learn how to get the netmask from an IP address using different commands.
df Command Giving Incorrect Disk Usage Information
Filed under Administration
Learn the reasons why the df command might give incorrect disk usage information.
Parallel Download Using curl
Filed under Networking, Processes
Learn different ways to use curl to download data from several URLs into different files in parallel.
How to Properly Manage Multiple Python Versions
Filed under Administration
Learn how to manage different versions of Python and Python packages.
Create VLANs in Linux
Filed under Networking
Learn various commands for creating and setting up VLANs in both Debian and RedHat systems.
Placing Files in RAM in Linux
Filed under Administration, Files
Learn how to place files into RAM in Linux.
Using Active Directory to Authenticate Linux Users
Filed under Administration, Security
Learn how to authenticate a Linux client through an Active Directory.
Populating Entropy Pool Using rngd
Filed under Security
Learn how to fix the low entropy issue in GPG command when attempting to generate a key pair.
Setting the Default python to python3
Filed under Administration
Learn how to set a default Python version in Linux.
Run and Update Linux Behind Proxy Servers
Filed under Networking
Learn how to run and update Linux behind proxy servers.
Increasing Scrollback Buffer of a Screen Session
Filed under Administration
Learn different ways to increase the scrollback buffer on a GNU screen session.
Get TX/RX Bytes Without ifconfig
Filed under Networking
Learn some alternative ways to read the TX/RX information, since ifconfig is deprecated and no longer supported.
ssh-agent Forwarding and sudo Into Another User
Filed under Administration
Learn how to forward ssh-agent and have access to the private keys when using sudo in the remote system.
How to Navigate Man Pages Efficiently
Filed under Administration
Learn how to navigate manual pages efficiently.
How Does traceroute Resolves Name
Filed under Networking
Learn how the traceroute command-line tool resolves a hostname to its IP address.
How Is ZFS Different From XFS
Filed under Filesystems
Learn about the differences between ZFS and XFS filesystems.
Different Types of Shebang in Linux
Filed under Scripting
Learn about some of the types of shebang lines commonly used.
Adding Other Operating Systems to the GRUB Bootloader
Filed under Administration
Learn how to add different Operating Systems to the boot menu.
How to Automount USB Devices in Linux
Filed under Administration
Learn about automounting USB (Universal Serial Bus) devices on Linux machines.
The Interactive and TTY Options in docker run
Filed under Administration, Docker
Learn about the -i and -t options of the docker run command.
Test Whether a Server Is Vulnerable to Shellshock Bug
Filed under Security
Learn about the shellshock bug and how to mitigate it.
iptables: Allow Traffic Only to a Single Domain
Filed under Networking
Learn how to restrict the traffic from our system to a single domain.
Make Git Ignore File Mode Change
Filed under File Permissions
Learn how Git tracks the permission bit of a file.
Understanding the /etc/mtab File
Filed under Filesystems
Learn about the /etc/mtab file in Linux.
Configuring Automatic LetsEncrypt SSL Certificate Renewal
Filed under Security
Learn how to configure automatic LetsEncrypt SSL certificate renewal for Nginx and Apache-based servers
Resolving Unmet Dependencies on Linux
Filed under Administration
Learn about the meaning of “unmet dependencies” error when using the apt-get command.
Using systemctl to List All Failed Units
Filed under Administration
Learn how to list all the failed units in your system using the systemctl command.
Determine if a File Write Is in Progress
Filed under File Editing
Learn how to check if a file write is in progress in Linux.
Adjusting Screen Resolution in Linux
Filed under Administration
Learn how to adjust the screen resolution in Linux.
Block Ports Using iptables in Linux
Filed under Networking
Learn how to allow traffic toward a specific port while blocking the rest using iptables and ufw.
jmap Error “Unable to Open Socket File”
Filed under Processes
Discover why jmap can return an “Unable to open socket file “error when creating a heap dump.
How to Uninstall Nginx Completely
Filed under Administration
Learn how to uninstall NGINX in Linux.
Using a Specific SSH Private Key When Using Git Command
Filed under Security
Learn how to use a specific private SSH key when running Git commands.
Difference Between VBoxVGA, VMSVGA, VBoxSVGA in VirtualBox
Filed under Administration
Learn about VirtualBox display adapters.
TCP Based Ping
Filed under Networking
Learn several commands that allow us to ping other hosts with TCP-based packets.
Difference Between NEW, ESTABLISHED, and RELATED Packets
Filed under Networking
Learn about NEW, ESTABLISHED, and RELATED iptable states.
Creating and Removing systemd Services
Filed under Administration
Learn how to create and remove systemd service files
Validating Certificates Using cURL
Filed under Web
Learn about cURL and how to use it for validating certificates.
Checking Whether a Firewall Is Running on Linux
Filed under Networking, Security
Learn various methods to check firewall status in Linux.
Efficiently Editing HTML/XML Files in Vim
Filed under File Editing
Learn how to edit markup language files in vim.
Check If a User Exists in Linux
Filed under Administration
Learn two useful methods of checking if a user exists.
How Do I Find if There Is a Rogue DHCP Server on My Network
Filed under Networking
Learn how to detect rogue DHCP servers.
What Is an Uninterruptible Process in Linux?
Filed under Processes
Learn about uninterruptible and interruptible sleep processes.
Difference Between resolve.conf, systemd-resolve, and Avahi
Filed under Networking
Learn about the differences among resolv.conf, systemd-resolve, and Avahi and how they resolve IP addresses.
List Assigned DHCP IP Addresses
Filed under Networking
Learn the commands to ask the DHCPD server to list assigned DHCP IP addresses.
Linux TCP/IP Connections Limit
Filed under Networking
Learn about the limits on the number of concurrent TCP connections, how they work, and how to tune our servers for specific workloads.
Configuring DNS in the resolv.conf File
Filed under Networking
Learn multiple ways to configure DNS in Linux.
How to Automate HTML-to-PDF Conversions
Filed under File Conversion
Learn how to convert HTML documents to PDF in Linux.
Optimize Battery Life in Linux
Filed under Administration
Learn how to optimize the battery’s life in computers with Linux operating systems
Multiple DHCP Servers on the Network
Filed under Networking
Learn how to have multiple DHCP servers on the network.
Accessing BitLocker-Encrypted Device in Linux
Filed under Security
Learn how to access a BitLocker-encrypted device in Linux.
Purpose of Swap Files in Vim
Filed under Administration, Files
Learn about the swap files of the vim editor.
How to Re-Install GRUB EFI
Filed under Installation
Learn about GRUB 2, how to re-install it, and repair it if any issues are found.
The .crt and .key Files
Filed under Security
Learn what are the .crt and the .key files in the context of an HTTPS server.
Setup Default Desktop Environment on Start Up
Filed under Administration
Learn how to set up your favorite Desktop environment to start up with your system.
Using ethtool in Linux
Filed under Networking
Learn about ethool and the capabilities it provides.
List All Users in a Linux Group
Filed under Administration
Learn a few methods to list all users in a Linux group.
Connecting to a Wireless Network Through Linux CLI
Filed under Networking
Learn how to connect a system to a wireless network using the command line from Linux.
Comparing Binary Files Under Linux
Filed under Files
Learn a few options to compare binary files in Linux.
Get the Hostname From an IP Address in Linux
Filed under Networking
Learn how to get the hostname from an IP address in Linux.
Limit SSH Access to Specific Clients by Address
Filed under Security
Learn strategies to secure our servers’ administrative services.
Generating a Key Pair via GPG
Filed under Security
Learn how to generate cryptographic keys quickly using gpg.
Differences Between vi and vim Editors
Filed under File Editing
Let’s compare vi and vim editors’ features.
Get Current System Time Zone in Linux
Filed under Administration
Learn the different ways to obtain the system time zone in Linux.
Restrict Size of the Buffer Cache in Linux
Filed under Administration
Learn about Buffer Cache in Linux and how to restrict its size.
Get the Start Time of a Long-Running Linux Process
Filed under Processes
Learn how to find out the start time of a long-running process in Linux.
The Difference Between Systemctl and Service Command in Linux
Filed under Administration
Learn the differences between systemctl and service commands in Linux.
Compare Strings in Dot-Separated Version Format
Filed under Scripting
Learn algorithms to compare two strings in dot-separated version format to determine which one is the latest version.
Put an Item at the End of an Alphabetic List in Linux
Filed under Files
Learn different approaches to putting items at the end of an alphabetic list in Linux.
Quickly Create a Large File on a Linux System
Filed under Filesystems
Learn how to create big files (> 100 MB) on a Linux system.
The Exclamation Mark (!) in Interactive Shells
Filed under Administration
Discover several use cases of the “!” symbol to rerun commands from the shell’s history.
How to Give Sudo Privileges to a User in Linux
Filed under Administration
Learn how to give full and limited sudo privileges to a local user in Linux.
Clone File System Hierarchy to Another Disk With Rsync
Filed under Filesystems
Learn how to clone the entire file system hierarchy with all the precautions.
Find All Serial Devices on Linux Without Opening Them
Filed under Administration
Learn how to find all the serial devices on Linux without the need of opening them.
Sort Processes by Network Usage on Linux
Filed under Networking
Learn tools and methods to monitor the network usage per process.
Different Ways of Running Jenkins in Linux
Filed under Administration
Learn different ways we can install and run Jenkins in Linux.
Get Final URL After a Redirect
Filed under Web
Learn how to get the final URL after a requested URL is redirected using curl and wget.
Which Process Has PID 0 ?
Filed under Processes
Learn how to check running processes in Linux, what the PID 0 is, and the actual process that has PID 0.
Forward X Over SSH to Run Programs Remotely
Filed under Networking
Learn how to configure X11 port forwarding to run programs remotely over SSH
Detect the Physical Connected State of a Network Connector
Filed under Networking
Learn how to query the status of the Ethernet port of a system
How to Foreground a Background Process in Linux
Filed under Processes
Learn how to handle interactive processes and non-interactive processes in Linux.
Docker Container Network Namespace Is Invisible
Filed under Docker, Networking
Learn why is the network namespace file in Docker invisible to the ip netns ls command.
What Is a Sysroot?
Filed under Scripting
Learn about sysroot and ways of tweaking it when calling the compiler.
Search Contents of Multiple PDF Files
Filed under File Searching
In this tutorial, we’ll look at some specialized commands that can be used to search for strings in PDF files.
Checking if a Variable Is a Number in Bash
Filed under Scripting
Learn how to check if a variable is a number in Bash.
Renaming All Folders and Files to Lowercase in Linux
Filed under File Editing
Learn how to rename all folders and files to lowercase in Linux.
xmllint in Linux
Filed under File Editing
Learn the wide range of functionalities offered by the xmllint command-line tool for handling XML files.
File Ownership Inside Docker Container
In this tutorial, we’ll look at the ownership of mounted files and folders within the Docker container.
Delete Zero-Byte Files in Linux
Filed under Files
In this tutorial, we’ll take a look at ways to delete files with size zero in Linux.
Linux tar Command – Archiving Files Without the Directory Structure
Filed under File Compression
Have a look at several ways of creating an archive file without keeping the directory structure.
Kill All Processes That Are Older Than a Certain Age
Filed under Processes
In this tutorial, we’ll learn how to kill the processes that are older than a certain time.
Linux Find Command With Regular Expressions
Filed under File Searching
In this tutorial, we’ll talk about the use of the command find with regular expressions (regex).
Change the Direction of Incremental Searching in a Shell
Filed under Search
Understand the searching functionalities that GNU Bash offers and also learn of a conflicting key sequence (C-s) used by both the terminal and the shell.
How to Run Bash Commands From a Text File
In this tutorial, we’re going to take a look at how we can run our bash commands that are in a txt file, in the current shell.
How to Check if a File Type Exists in a Directory
Filed under File Searching
In this tutorial, we’ll discuss a variety of ways to check the file types in a directory.
The “Oldconfig” Target in the Linux Kernel Makefile
Filed under Administration, Installation
In this tutorial, we’ll configure the Linux kernel and learn about its oldconfig Makefile target.
How to Show the wget Progress Bar Only?
Filed under Administration
In this tutorial, we’re going to customize the wget output and show the progress bar only.
How to Monitor Disk IO in a Linux System
Filed under Administration, Processes
In this tutorial, we’ll discuss how to monitor disk I/O activity in the Linux system.
Linux Process States
Filed under Administration, Processes
In this article, we’ll learn about the process states in Linux.
Setting Command Timeouts in Bash
Filed under Administration
In this tutorial, we’ll see into different ways of using timeouts in Bash.
Linux Commands to Translate Domain Name to IP
Filed under Networking
In this tutorial, we’ll discuss how to resolve or translate a domain name to an IP address. For this purpose, we’ll be using the following commands: ping, host, nslookup, dig, and nmap.
Looping Through the Content of a File in Bash
In this tutorial, we’ll see how to loop through the contents of a file, line by line. This might sound like a trivial task, but there are some caveats that we need to be aware of.
Rotating Logs With Logrotate in Linux
Filed under Administration
In this tutorial, we’ll be looking at the logrotate tool. Specifically, we’ll learn how to automate log rotation using logrotate in Linux.
Replacing Spaces from Filenames in Linux
Filed under File Editing
In this article, we’ll discuss some of the plausible ways to rename files by replacing space(s) from the filename.
Network Failures Simulation in Linux
Filed under Administration, Networking
In this tutorial, we’ll be looking at simulating some network failures in Linux. Particularly, we’ll achieve the simulation using the tc command-line along with the netem queueing discipline.
Find Out the Total Physical Memory (RAM) on Linux
Filed under Administration
In this tutorial, we’re going to see different tools that we can use to check for total physical memory in Linux.
Linux Shell File Protection
Filed under File Permissions, Security
In this article, we’ll discuss the usage of Linux built-in protection mechanisms to prevent accidental file overwrites.
tmux in Linux
Filed under Administration, Processes
In this tutorial, we’ll be learning the tmux command in Linux. Particularly, we’ll look at some of the functionalities and commands offered by tmux.
How to Find All Links for a Specific File
Filed under Administration, Filesystems
In this tutorial, we’ll have a look at how to find all of the soft links for a specific file.
Create Bash Alias That Accepts Parameters
Filed under Scripting
In this tutorial, we’ll explain the steps to create an alias and learn how to pass parameters to it in the Bash shell.
Command Chaining: Inline or Already Running Processes
Filed under Administration, Processes
In this brief tutorial, we’ll see some ways for serializing commands using bash in Linux. Even when some of them are already running.
Kill All Members of a Process Group
Filed under Administration, Processes
In this tutorial, we’ll take a look at process management using process groups. Also, how to kill all processes that belong to a process group.
Working With Zip Command in Linux
Filed under Files
Learn how to use the zip command-line tool in Linux.
Mounting Remote Directory in Linux Using SSHFS
Filed under Administration, Networking
In this tutorial, we’ll be looking at how to mount a remote directory locally in Linux using the tool sshfs.
Remote File Synchronization in Linux
Filed under Administration, File Permissions, File Viewing
In this tutorial, we’re going to learn how to use rsync to synchronize files and folders. We’ll learn how to do this on our local system, and also on remote machines.
Sniffing Packet Using tcpdump in Linux
Filed under Networking
In this article, we’ll be looking at the tool tcpdump in Linux. In particular, we’ll be learning how to capture network packets using tcpdump in a Linux environment.
The strace Command in Linux
Filed under Administration, Processes
In this article, we’ll be looking at the tool strace in Linux.
Monitoring Network Usage in Linux
Filed under Administration, Networking
In this article, we’ll be looking at different tools for monitoring network usage in Linux.
Encrypting and Decrypting Directory in Linux
Filed under Administration, Security
In this tutorial, we’ll take a look at the different tools we can use to encrypt and decrypt directories and their contents in Linux.
Checking Host’s Network Availability in Linux
Filed under Networking
In this tutorial, we’ll look at the different ways to check for a host’s network availability in Linux.
The netcat Command in Linux
Filed under Networking
In this tutorial, we’ll take a look at the netcat command in Linux. netcat is a powerful networking utility tool.
Running Script or Command as Another User in Linux
Filed under Administration, Scripting
In this tutorial, we’ll learn different ways of running scripts or commands as another user in Linux.
Sending Emails From Terminal In Linux
In this tutorial, we learn how to send emails from a Linux terminal.
Debugging a Bash Script
Filed under Scripting
In this tutorial, we’ll look at the various techniques to debug Bash shell scripts in Linux
How to List All Connected SSH Sessions
Filed under Networking, Security
Have a look at how to list active SSH sessions in Linux.
How to Insert a Line at Specific Line Number
Filed under File Editing
Learn how to insert text at a specific line of a file using Linux commands.
How to Force Detach Screen From Another SSH Session
Filed under Administration
Have a look at how to detach and reattach to another screen session.
How to Change the Default Home Directory of a User
Filed under Administration
Let’s see how to change the default home directory of a user on Linux.
How to Append the Contents of Multiple Files Into One File
Filed under Files
Have a look at how to append the contents of multiple files into one in Linux
What does /opt mean in Linux?
Filed under Administration, Filesystems
Learn about the /opt directory in Linux and when/how to use it.
Linux Kernel Versions: 32-Bit vs 64-Bit
Filed under Administration
Have a look at a few ways to discover whether you’re using a 32-bit or a 64-bit Linux kernel
Configuring and Managing Core Dumps in Linux
Filed under Administration
Learn how to manage and configure core dumps. We’ll investigate kernel.core_pattern and coredumpctl.
Combine and Execute Multiple Linux Commands
Filed under Administration
Learn different ways to combine and execute multiple Linux commands efficiently.
Starting a Shell in the Alpine Docker Container
Filed under Docker
Learn how to start a shell in a new or running Alpine Docker container.
Sudo Command in Linux
Filed under Administration
A guide to the Linux sudo command and its options.
Baeldung on Scala
- All
- Scala Collections (7)
- Scala Strings (4)
- Scala IO (3)
- Scala OOP (2)
- Scala Basics (2)
- Build Tools (2)
- Scala Web (1)
- Scala Numbers (1)
Iterate a List Backwards in Scala
Filed under Scala Collections
Learn how to iterate a Scala list backward using only the existing Scala standard syntax constructors.
Remove Elements from the End of a String in Scala
Filed under Scala Strings
Learn how we to remove characters from the end of a String in Scala.
Introduction to Scala.js
Filed under Scala Web
Learn how to create a front-end application in Scala using the Scala.js plugin.
Get a Random Number in Scala
Filed under Scala Numbers
Learn how to generate a random number in Scala.
Find Unique Items in a List in Scala
Filed under Scala Collections
Learn how to find unique items in a list using Scala
Console I/O in Scala
Filed under Scala IO
Learn how to read user input using Scala.
Guide to ArrayBuffer
Filed under Scala Collections
In this tutorial, we’ll dig into the Scala ArrayBuffer class.
Read a File From the Resources Folder in Scala
Filed under Scala IO
In this tutorial, we’ll learn different approaches to reading a file from the resources folder in Scala
Printing Arrays in Scala
Filed under Scala Collections
In this tutorial, we’ll learn different approaches to printing the contents of an Array in Scala.
Check if a String Is a Number in Scala
Filed under Scala Strings
In this tutorial, we’ll see a few different solutions to check if a given string is a number using Scala.
Check If a File or Path Exists in Scala
Filed under Scala IO
Learn a few different solutions to find if a given file or directory exists using Scala.
Parameter Untupling in Scala 3
Filed under Scala Collections
In this tutorial, we’ll look into the new parameter untupling capabilities introduced in Scala 3.
How to See the Dependency Tree in SBT?
Filed under Build Tools
In this tutorial, we’ll see why and how to use SBT to check our project dependency tree.
StringBuilder in Scala
Filed under Scala Strings
In this tutorial, we’ll see why and how to use the StringBuilder class in Scala.
Scala Traits vs. Abstract Classes
Filed under Scala OOP
In this tutorial, we’ll see what abstract classes and traits are in Scala and the key differences between them.
Iteration With Index and Value in Scala
Filed under Scala Collections
In this tutorial, we’ll see how we can iterate through a collection while accessing the index in Scala.
Joining a Collection of Strings in Scala
Filed under Scala Strings
In this tutorial, we’ll see how to create a single String from a collection of elements, and in particular, a collection of Strings.
Repeated Parameters in Scala
Filed under Scala Basics
In this tutorial, we’ll see how to use the repeated parameters feature in Scala.
Finding the Index of an Element in a List with Scala
Filed under Scala Collections
In this tutorial, we explore the ways to find the index element in a List in Scala.
Guide to Scaladoc
Filed under Scala Basics
In this tutorial, we’ll learn how to add Scaladoc to code for a Scala project.
Configuring Heap Size for SBT
Filed under Build Tools
Have a look at several ways to configure the JVM heap size for applications built with SBT.
Difference Between Case Object and Object
Filed under Scala OOP
Explore the concepts of case object and object in Scala.
Baeldung on Computer Science
- All
- Security (10)
- Math and Logic (7)
- Software Architecture (6)
- Networking (6)
- Algorithms (6)
- Programming (4)
- Data Structures (4)
- Web (2)
- Trees (2)
- Machine Learning (2)
- Graphs (2)
- Sorting (1)
- Searching (1)
- OS (1)
- Graph Traversal (1)
- Deep Learning (1)
- Concurrency (1)
- Artificial Intelligence (1)
Skewness and Kurtosis in Statistics
Filed under Math and Logic
Learn about skewness and kurtosis in statistics.
What Is Web 3.0?
Filed under Web
Discover what is Web 3.0.
What Is Sharding?
Filed under Software Architecture
Learn the fundamentals of sharding and details of how it works.
Popular Authentication Methods for Web Apps
Learn about authentication methods for web apps and related best practices.
Advanced Persistent Threats
Filed under Security
Discover advanced persistent threats, their types, and known actors. Also learn some measures to increase resilience against APTs.
Introduction to Storage for Data Centers
Filed under Networking
Learn about the various types of data storage used for professional computing.
Introducing Backup Policies
Filed under Security
Learn about backup, its types, strategies, and policies.
What Is an ORM? How Does It Work? How Should We Use One?
Filed under Programming, Software Architecture
Learn what Object-Relational Mapping tools are, what they do, how they work, and why to use one.
Array Implementation of Stacks
Filed under Data Structures
Learn how to implement a stack using the fixed-size array representation.
Should We Deploy Database and Web Server Apart?
Filed under Software Architecture
Learn some database and web server deployment tips and good practices.
Phishing Attacks
Filed under Security
Learn about phishing attacks and how to prevent them.
Big Endian vs. Little Endian
Filed under Software Architecture
Learn about endianness and the differences between big-endian and little-endian.
What Are File Path Transversal Attacks?
Filed under Security
Learn about file path transversal attacks and their mitigation.
Does Code Obfuscation Bring Security Benefits?
Filed under Security
Learn about the security benefits that code obfuscation brings.
What Are Zero-Day Attacks?
Filed under Networking, Security
Learn what are zero-day attacks and what we can to do mitigate them.
Computer Clusters, Types, Uses and Applications
Filed under Software Architecture
Learn about computer clusters, their types, use cases, and applications.
What Is SQL Injection?
Filed under Security
Learn about SQL Injection and the main techniques to mitigate hackers attacks.
Fast Algorithms for Solving a System of Linear Equations
Filed under Math and Logic
Learn how a matrix can be decomposed into simpler lego blocks to solve a system of linear algebraic equations.
Hill Climbing Algorithm
Filed under Algorithms
Learn the characteristics of one of the simplest and best-known optimization algorithms: hill climbing.
TCP Checksum Errors: Issues and Workarounds
Filed under Networking
In this tutorial, we’ll explore those questions and discuss some ways to improve our TCP relying systems robustness with better error detection or even correction.
An Introduction to the Hidden Markov Model
Filed under Artificial Intelligence, Math and Logic
In this tutorial, we’ll look into the Hidden Markov Model, a type of statistical model.
Multi-Verse Optimizer
Filed under Algorithms, Math and Logic
In this tutorial, we’ll take a look at the Multi-Verse Optimization Algorithm (MVO) and what it does.
Features, Parameters and Classes in Machine Learning
Filed under Machine Learning
Learn about three key components of a Machine Learning (ML) model: Features, Parameters, and Classes.
What Is the Difference Between Active and Passive FTP?
Filed under Networking
In this tutorial, we’ll discuss how FTP operates, detailing the difference between active and passive operating modes.
Why Can’t Prim’s or Kruskal’s Algorithms Be Used on a Directed Graph?
Filed under Graph Traversal
In this tutorial, we’re going to explore why we can’t use Prim’s and Kruskal’s algorithms on a directed graph.
Multiprocessing and Multithreading
Filed under Concurrency
In this tutorial, we’ll see an introduction to multiprocessing and multithreading.
Finding the K Smallest Numbers in an Array
Filed under Sorting
In this tutorial, we’ll show several ways to find the $k$ smallest numbers in an array. We’ll also discuss those methods’ complexity and relative performance to one another.
Protocols Used for PING
Filed under Security
In this tutorial, we’ll try to explain the protocols used by ping and explore various aspects of them.
Finding Three Elements in an Array Whose Sum Is Closest to a Given Number
Filed under Data Structures, Math and Logic
Learn how to find three elements in an array such that the sum is closest to a given number.
Algorithms to Generate K-Combinations
Filed under Networking, Security
In this tutorial, we’ll learn about different algorithms to generate all k element subsets of a set containing n elements.
Runtime vs. Compile Time
Filed under Programming, Software Architecture
In this tutorial, we’ll explain the concepts behind Compile-time and Runtime and explore various aspects of them.
Technical Debt
Filed under Programming
In this article, we’ll elaborate on technical debt and its dangers.
Process Scheduling
Filed under OS
In this tutorial, we’re going to explain how CPU scheduling works and we’ll clarify scheduling criteria and algorithms.
Primality Test: Miller-Rabin Method
Filed under Math and Logic
In this tutorial, we’ll study one of the methods used to verify if n is prime without resorting to factorization: the Miller-Rabin method.
Word Embeddings: CBOW vs Skip-Gram
Filed under Deep Learning, Machine Learning
In this tutorial, we’ll discuss word embeddings with CBOW and Skip-Gram.
Brewer’s CAP Theorem
Filed under Networking
In this tutorial, we’ll introduce and explain the CAP theorem.
Finding the Lowest Common Ancestor in a Directed Acyclic Graph
Filed under Algorithms, Graphs
In this tutorial, we’ll introduce one of the algorithms of finding the lowest common ancestor in a directed acyclic graph. Also, we’ll talk about its time complexity.
How to Determine if a List of Polygon Points Are in Clockwise Order
Filed under Algorithms, Math and Logic
In this tutorial, we’ll create a simple algorithm to determine the polygon points’ orientation. Furthermore, we’ll revise and use some formulas for the area computation.
Find Cycle Start Node in a Singly Linked List
Filed under Algorithms, Data Structures
In this tutorial, we’ll learn how to find a cycle starting node in a linked list.
How to Calculate the Number of Different Binary and Binary Search Trees
Filed under Searching
Learn about computing the number of different Binary and Binary Search Trees.
Heap vs Binary Search Tree
Filed under Algorithms, Data Structures, Trees
Have a look at the similarities and differences between the Heap and Binary Search Tree (BST) data structures.
Height of a Balanced Tree
Filed under Trees
Have a look at how to determine the height of a balanced Binary Search Tree.
Time and Space Complexity of Adjacency Matrix and List
Filed under Graphs
Learn one of the main aspects of Graph Theory — graph representation.
Clean Code: Comments
Filed under Programming
Let’s have a look at comments in code, their purpose, and some tips on the right use of comments.
Baeldung on Kotlin
- All
- Kotlin Collections (7)
- Kotlin Strings (4)
- Kotlin IO (2)
- Kotlin Classes and Objects (2)
- Patterns (1)
- Kotlin Numbers (1)
- Kotlin Basics (1)
- Kotlin (1)
Convert an Array to a String
Filed under Kotlin Strings
Learn how to convert an Array’s content to a String in Kotlin.
Implement a MultiMap in Kotlin
Filed under Kotlin Collections
Lear about MultiMap, a Map implementation that doesn’t exist in Kotlin stdlib but is provided by the libraries such as Guava, Spring, and Apache.
The ..< Operator for Open-ended Ranges in Kotlin
Filed under Kotlin Basics
Learn about the new Kotlin operator
Converting an Int? to an Int in Kotlin
Filed under Kotlin Numbers
Learn how to extract a value of a nullable variable.
Check if Condition Is True for All Elements in a List
Filed under Kotlin Collections
Learn how to check if a condition is true for all elements in a Kotlin list.
Sort LinkedHashMap by Values in Kotlin
Filed under Kotlin Collections
Learn how to sort a LinkedHashMap based on its values.
How to Work With List Casts in Kotlin
Filed under Kotlin Collections
Learn how to handle list type checking.
Implementing the Command Design Pattern in Kotlin
Filed under Patterns
Learn how to implement the Command Design Pattern in Kotlin.
Read and Write to Excel With Kotlin
Filed under Kotlin IO
Learn how to use the Apache POI library to read and write Excel files.
Extend Data Class in Kotlin
Filed under Kotlin Classes and Objects
Learn how to extend a data class in Kotlin.
Kotlin Equivalent to Java String Arrays
Filed under Kotlin Collections, Kotlin Strings
Learn how to create an array of primitives and ordinary types.
How to Invoke External Command From Within Kotlin
Filed under Kotlin IO
Learn how to invoke external commands from Kotlin.
Parsing a URL String
Filed under Kotlin Strings
Learn how to parse an URL string with URL and URI classes.
Companion Objects in Kotlin Interfaces
Filed under Kotlin Classes and Objects
Learn how to define a companion object in an interface.
Creating a Byte Array in Kotlin
Filed under Kotlin Collections
Learn how to create a byte array in Kotlin
Convert a String to a Byte Array in Kotlin
Filed under Kotlin Strings
Learn how to convert a String to a byte array in Kotlin.
Working With Maps in Kotlin
Filed under Kotlin Collections
In this tutorial, we’ll look at the Map collection type in Kotlin.
Exception Handling in Kotlin
Filed under Kotlin
Understand exception handling in Kotlin
Baeldung on Ops
- All
- Docker (6)
- Kubernetes (3)
- Git (2)
- Monitoring (1)
- Jenkins (1)
- Cloud (1)
Parameterizing a Helm Chart
Filed under Kubernetes
Learn how to parameterize a Helm chart and make it configurable.
Configure Git Branch Selection in Jenkins
Learn how to configure a Git branch selection in Jenkins.
Difference Between PV and PVC in Kubernetes
Filed under Kubernetes
Discover the difference between PV and PVC in Kubernetes.
Introduction to Pinpoint
Filed under Monitoring
Learn about Pinpoint, an open-source application performance management software with excellent capabilities.
Keep Subdirectory Structure in Dockerfile Copy
Filed under Docker
Learn to copy a directory into a Docker image preserving the subdirectory structure.
Updating PATH Environment Variable in Dockerfile
Filed under Docker
Learn how to update the PATH variable in Docker.
Adding a Comment in a Dockerfile
Filed under Docker
Learn how to add comments in a Dockerfile.
Caching Maven Dependencies with Docker
Filed under Docker
Learn how to build Maven projects in Docker
How to Get Docker-Compose to Always Use the Latest Image
Filed under Docker
In this tutorial, we’ll check out several options to ensure that docker-compose always uses the latest images of the applications.
Kubernetes Deployment vs. StatefulSets
Filed under Cloud, Kubernetes
In this tutorial, we’ll discuss two different ways to deploy our application(pods) on Kubernetes using two resources provided by Kubernetes: Deployment and StatefulSet.
Configuring git Credentials
Filed under Git
In this tutorial, we’ll look at how to configure git credentials to prevent having to enter them manually.
Difference Between run, cmd and entrypoint in a Dockerfile
Filed under Docker
In a Dockerfile, we often encounter instructions like run, cmd, or entrypoint. But what’s the difference between them?