Learn how to configure proxy authentication using Java 11+ HttpClient, Apache HttpClient, Spring’s RestTemplate, and Spring’s WebClient.
Also find me here:
Baeldung Author
Ulisses Lima
By day, I write new code, I improve bad code, and I try to enforce performance standards. Mostly in Java. I also love automating stuff. Mostly in bash. By night, I write technical articles and write tools for personal management. For fun: I'm a Street Fighter player (3rd Strike and V), trying to learn Japanese.
Here's what I've written (so far):
Baeldung on Java
- All
- Spring Data (6)
- NoSQL (6)
- Testing (4)
- HTTP Client-Side (4)
- Spring Boot (3)
- Security (3)
- Java (3)
- Jackson (3)
- Spring Web (2)
- REST (2)
- Java IO (2)
- JPA (2)
- Core Java (2)
- Web Services (1)
- Spring WebFlux (1)
- Reactive (1)
- Persistence (1)
- Logging (1)
- Java Numbers (1)
- Java Map (1)
- Java Dates (1)
- Jakarta EE (1)
- JSON (1)
- Data (1)
- Architecture (1)
Dapr Workflows With PubSub
Filed under Architecture
Learn how to combine Dapr PubSub with Dapr Workflows, to create a system that handles event-driven messaging and complex multi-step processes.
Guide to Jersey Logging on Server
Filed under Logging
Learn how Jersey makes enabling and customizing server-side logging easy.
Preventing Jackson From Fetching Lazy Entity Fields
Working with JPA and Jackson often raises the challenge of serializing entities that contain lazy-loaded associations. This tutorial shows how to prevent Jackson from triggering unwanted database queries when lazy fields are uninitialized; we’ll look at DTOs, annotations, and Jackson’s own jackson-datatype-hibernate6 module.
TupleTransformer and ResultListTransformer in Hibernate
Filed under Persistence
While JPQL projections solve many cases, sometimes we need more flexibility, like mapping complex DTOs, restructuring query results, or post-processing the entire result set. Hibernate’s former answer for this is ResultTransformer. Hibernate 6, however, replaces it with two new interfaces. This article shows how to work with TupleTransformer for row-level transformations and ResultListTransformer for list-level processing.
Using HTTPS With Jersey Client in Java
Filed under HTTP Client-Side, Security
Configuring Java clients for HTTPS or for mTLS can be tricky. It’s tempting to add some kind of trust-all-certs solution and call it good. Fortunately there are Java libraries like Jersey that can help us make the right decisions.
How to Pass a Variable From One Thread Group to Another in JMeter
Filed under Testing
In this quick tutorial, we’ll explore how to share variables between JMeter Thread Groups. This is a common need when one group performs a setup task, like authentication or data preparation, and another group consumes the result. JMeter has some built in variables we can access, but also we can take matters into our own hands and access the file system to persist values.
Using a Different Client Certificate per Connection in Java
Filed under HTTP Client-Side, Security
We can customize Java’s SSLContext to use different client certificates based on the target server. To create the needed KeyManager and TrustManager, we can use libraries like Apache HttpComponents help or we can stick with pure Java.
Implementing Unions in Hibernate
Filed under JPA
We can use the union operation in Hibernate 6 to unify results from two related database entities. There are also a few other ways, depending on our circumstances.