Learn how to create temporary directories in Java.
Also find me here:
Baeldung Editor
Rui Vilao
Rui is a Software Engineer with over 10 years of experience in building scalable distributed systems is as well as backend web applications. He's passionate about building software and find easy and ready to grow elegant solutions. Currently, he lives in Berlin.
Here's what I've reviewed (so far):
Baeldung on Java
- All
- Java (12)
- Algorithms (9)
- Spring Boot (6)
- Java Collections (5)
- Testing (4)
- Spring Data (4)
- Spring (4)
- Java String (4)
- DevOps (4)
- Spring Web (3)
- REST (3)
- Persistence (3)
- Java IO (3)
- Java Array (3)
- JPA (3)
- HTTP Client-Side (3)
- Core Java (3)
- Spring Security (2)
- Spring MVC (2)
- Spring Cloud (2)
- Security (2)
- Logging (2)
- JVM (2)
- XML (1)
- Web Services (1)
- Reactive (1)
- NoSQL (1)
- Maven (1)
- Java Streams (1)
- Java Numbers (1)
- Java Concurrency (1)
- Jakarta EE (1)
- JSON (1)
- Groovy (1)
- Cloud (1)
Using Hidden Inputs with Spring and Thymeleaf
Filed under Spring Web
Learn how to use hidden inputs with Thymeleaf.
Introduction to Spring Data Azure Cosmos DB
Filed under Cloud, Spring Data
Learn how to interact with Azure Cosmos DB using Spring Data.
Java Files Open Options
Filed under Java IO
Learn about the several options when opening files in Java.
How to Implement a CNN with Deeplearning4j
Filed under Algorithms, Java
Learn how to build and train a convolutional neural network model using the Deeplearning4j library in Java.
Taking Screenshots Using Java
Filed under Java
Learn how to take screenshots using Java.
Guide to SDKMAN!
Filed under DevOps
Learn how to manage several versions of Java SDKs among other Java Ecosystem tools using SDKMAN!
Converting List to Map With a Custom Supplier
Filed under Java Collections
Learn several ways to convert a List into a Map using Custom Suppliers.
YAML to List of Objects in Spring Boot
Filed under Spring Boot
Learn how to map a YAML list into a java List using Spring Boot.
Converting a Java String Into a Boolean
Filed under Java String
Learn how to convert a string into a boolean using Java.
Getting MAC Addresses in Java
Filed under DevOps
Learn how to get the mac addresses of network card interfaces in Java.
Implementing a Ring Buffer in Java
Filed under Algorithms, Java
Learn how to implement a Ring Buffer in Java.
Java Heap Space Memory with the Runtime API
Filed under JVM
Learn how to access memory information of a JVM using the Java Runtime API.
WildFly Administration Remote Access
Filed under Jakarta EE
Learn how to expose the administrator console of WildFly for remote access.
Testing Exceptions with Spring MockMvc
Filed under Spring MVC, Testing
Learn how to unit test controller exceptions using Spring MockMvc.
Redirecting Logged-in Users with Spring Security
Filed under Spring Security
Learn several ways how to redirect logged-in users from the login page using Spring Security.
What Is [Ljava.lang.Object;?
Filed under Java Array
Learn what [Ljava.lang.Object; is and how to better print array objects.
Proxies With RestTemplate
Filed under HTTP Client-Side, REST
Learn how to send a request to a proxy using Apache’s RestTemplate in Java.
Setting Custom Feign Client Timeouts
Filed under Spring Cloud
Learn how to set custom timeouts on the Spring Cloud’s Feign Client.
Super Type Tokens in Java Generics
Filed under Java
Learn how to preserve the generic type information at runtime using super type tokens.
A Guide to the Hibernate Types Library
Filed under Persistence
Learn how to use HIbernate Types and extend the types set of Hibernate.
Clicking Elements in Selenium using JavaScript
Filed under Testing
Learn how to click elements using Javascript in Selenium.
Introduction to Finagle
Filed under Java
Learn how to send and receive information over the wire using Twitter’s RPC Library Finagle.
How to Dynamically Autowire a Bean in Spring
Filed under Spring
Learn how to autowire beans dynamically given ceertain conditions.
Find Unused Maven Dependencies
Filed under Maven
Learn how to analyze unused dependencies in Maven using the Maven Dependency Plugin.
Mapping Lists with ModelMapper
Filed under Java Collections
Learn how to map lists of different element types using Model Mapper.
Introduction to DBUnit
Filed under Testing
Learn how to set up database states for your unit tests using DBunit.
Comparing Long Values in Java
Filed under Java Numbers
Learn how to compare long values in Java.
Introduction to Lock Striping
Filed under Java Concurrency
Learn the key differences between coarse-grained synchronization and fine-grained synchronization and how to implement them in Java.
L-Trim and R-Trim Alternatives in Java
Filed under Java String
Learn several methods how to achieve l-trim and r-trim in java.
Could Not Reserve Enough Space for Object Heap
Filed under JVM
Learn the possible causes for the “Could Not Reserve Enough Space For Object Heap” error and how to solve it.
The Java Headless Mode
Filed under Core Java
Learn how to work with graphic-based applications when you don’t have the necessary devices using the Java Headless Mode.
Final vs Effectively Final in Java
Filed under Core Java
Learn the difference between Final and Effectively Final in Java.
Working with Lazy Element Collections in JPA
Filed under JPA
Learn how to work with lazy collection in JPA.
Pre-compile Regex Patterns Into Pattern Objects
Filed under Java
Learn the benefits of pre-compile regex pattern and the new methods introduced in Java 8 and 11.
Deny Access on Missing @PreAuthorize to Spring Controller Methods
Filed under Spring Security
Learn how to deny access by default on missing PreAuthorize annotations.
How to Merge Two Sorted Arrays in Java
Filed under Algorithms, Java Array
Learn how to merge two sorted arrays in Java.
FetchMode in Hibernate
Filed under Persistence
Learn how to use FetchMode in Hibernate.
Knapsack Problem Implementation in Java
Filed under Algorithms, Java
Learn how to solve the Knapsack problem in Java.
Prototype Pattern in Java
Filed under Java
Learn about and how to apply the Prototype Pattern in Java.
Fallback for Zuul Route
Filed under Spring Cloud
Learn how to configure Zuul routes with fallback.
Excluding URLs for a Filter in a Spring Web Application
Filed under Spring MVC
Learn how to exclude URLs from being executed in Spring Web filters. A bit advanced but highly highly useful.
Authentication with HttpUrlConnection
Filed under Security
Learn how to authenticate HTTP requests using HttpUrlConnection.
Parsing an XML File Using SAX Parser
Filed under XML
Learn how to parse an XML file in Java using SAX Parser.
Graceful Shutdown of a Spring Boot Application
Filed under DevOps, Spring Boot
Shut down a Spring Boot application gracefully.
Repositories with Multiple Spring Data Modules
Filed under Spring, Spring Data
Learn several ways how to configure multiple data modules in your Spring Application.
OCP Certification – Advanced Java Class Design
Filed under Java
Learn some tips on common aspects of the OCP Certification exam.
Logging Spring WebClient Calls
Learn how to log Spring WebClient calls, useful for auditing and debugging.
A Quick Guide to Working with Web Services in Groovy
Filed under Groovy, Web Services
Learn how to work with Web Services in Groovy.
Removing an Element From an ArrayList
Filed under Java Collections
Learn several ways to remove an element from an ArrayList in Java.
Primitive Collections in Eclipse Collections
Filed under Java Collections
Learn about primitive collections in Eclipse collections, performance and how to interact with them.
A Guide to System.exit()
Filed under Core Java
Learn how and when to use the Java System.exit() function.
Logging HTTP Requests with Spring Boot Actuator HTTP Tracing
Filed under DevOps, Logging, Spring Boot
Learn how to trace HTTP calls using Spring Boot Actuator.
Counting Words in a String with Java
Filed under Java String
Learn several ways to count words in a Java String.
Calculating Logarithms in Java
Filed under Algorithms
Learn several ways to calculate logarithms in Java.
Finding Greatest Common Divisor in Java
Filed under Algorithms
Learn several ways to find the Greatest Common Divisor in Java.
Better Retries with Exponential Backoff and Jitter
Filed under Algorithms
Learn how to better control your application retries using backoff and jitter from Resilience4j.
Guide to StreamTokenizer
Filed under Java
Learn how to parse a stream of characters with StreamTokenizer.
Mapping Entity Class Names to SQL Table Names with JPA
Filed under JPA
Learn how table names are generated by default and how to override that behavior.
A Guide to the sql2o JDBC Wrapper
Filed under Persistence
Learn how to interact with sql2o – a Java library that enables database manipulation using an idiomatic language.
Looping Diagonally Through a 2d Java Array
Filed under Algorithms, Java Array
Learn how to loop diagonally in a 2d array in Java.
Spring WebClient vs. RestTemplate
Filed under HTTP Client-Side, REST, Spring
Learn how to make server-side HTTP calls using WebClient and RestTemplate.
Get the Current Working Directory in Java
Filed under Java IO
Learn different ways to retrieve the current working directory in Java.
Disable Spring Data Auto Configuration
Filed under Spring Boot, Spring Data
Learn the two ways to disable Spring Boot’s auto-configuration for Spring Data
The Java SecureRandom Class
Filed under Security
Learn how to use the SecureRandom class in Java and how to produce safe random numbers.
Templating with Handlebars
Filed under Java String
Learn how to build and interact with templates using Handlebars.
Java IntStream Conversions
Filed under Java Streams
Learn how to work with integer streams using the Java Stream API.
Understanding the JAR Manifest File
Filed under Java
Learn about the JAR Manifest file, its capabilities and more.
Lazy Initialization in Spring Boot 2
Filed under Spring Boot
Learn how to configure lazy initialization in Spring Boot.
A Guide to the Folding Technique in Java
Filed under Algorithms
Learn about the most popular hashing techniques, their pros, and cons.
Copying Sets in Java
Filed under Java Collections
Learn several different ways how to copy a Set in Java.
Java Optional as Return Type
Filed under Java
Learn the best practices and when to return the Optional type in Java.
Guide to ApplicationContextRunner in Spring Boot
Filed under Spring Boot, Testing
Learn how to make the best out of ApplicationContextRunner in Spring Boot.
Defining JPA Entities
Filed under JPA
Learn how to define entities and customize them using the Java Persistence API.
Spring Data JPA and Named Entity Graphs
Filed under Spring Data
Learn how to better control the entities you want to fetch using Spring JPA.
Spring WebClient Requests with Parameters
Filed under HTTP Client-Side, REST, Spring Web
Learn how to reactively consume REST API endpoints with WebClient from Spring Webflux.
MongoDB BSON Guide
Filed under NoSQL
Learn how to interact with MongoDB using BSON.
Rendering Exceptions in JSON with Spring
Filed under JSON, Spring Web
Learn how to render exceptions in JSON back to the client using Spring.