Learn how to set and evaluate Excel formulas in Java with Apache POI
Also find me here:
Baeldung Editor
Josh Cummings
Josh has been a software engineer for over 15 years building enterprise applications across multiple industries. He has long been passionate about application security and loves opportunities to mentor and to learn from others. When Josh isn't hacking away at code, he is either running, playing basketball, camping, or reading a Brandon Sanderson novel.
Here's what I've reviewed (so far):
Baeldung on Java
- All
- Java (11)
- Spring (9)
- Core Java (8)
- Algorithms (7)
- Spring Boot (6)
- Security (6)
- Java String (6)
- DevOps (6)
- Persistence (5)
- Testing (4)
- Spring Persistence (4)
- Spring Data (4)
- Java IO (4)
- JSON (4)
- JPA (4)
- IDE (4)
- Data (4)
- Spring Security (3)
- Spring MVC (3)
- Spring Cloud (3)
- Reactive (3)
- Java Array (3)
- Architecture (3)
- REST (2)
- Maven (2)
- Logging (2)
- Java Map (2)
- Java Dates (2)
- Java Collections (2)
- Jakarta EE (2)
- Groovy (2)
- XML (1)
- Web Services (1)
- NoSQL (1)
- Java Streams (1)
- Java Concurrency (1)
- Gradle (1)
- Cloud (1)
Testing @Cacheable on Spring Data Repositories
Filed under Spring Data, Spring Persistence
Learn how to isolate the caching layer in your Spring Data tests.
Writing IntelliJ IDEA Plugins Using Gradle
Learn how to write your own IntelliJ plugin using Gradle.
Inject Arrays and Lists From Spring Properties Files
Filed under Spring
Learn various ways to use @Value and SpEL to inject property values as arrays or lists in Spring
OpenAPI JSON Objects as Query Parameters
Filed under REST
Learn how to specify JSON objects as query parameters using the OpenAPI specification.
Multi-Release JAR Files with Maven
Filed under Maven
Learn about Maven’s support for multi-release JAR files
Converting a BufferedReader to a JSONObject
Filed under JSON
Learn about JSONObject’s support for Readers
CQRS and Event Sourcing in Java
Filed under Architecture, Data, Java
Explore the basic concepts of the CQRS and Event Sourcing design patterns.
Applying CI/CD With Spring Boot
Filed under DevOps, Spring Boot
Learn how to go from Spring Boot to CI/CD, all with freely available, open-source tooling.
How to Test GraphQL Using Postman
Filed under Testing, Web Services
Learn about Postman’s support for GraphQL
How to Extract a Mono’s Content in Java
Filed under Reactive
Learn how to subscribe or block for a Mono’s promised value.
Convert String to Integer in Groovy
Filed under Groovy
Learn the several ways to convert from a String to an Integer in Groovy
Spring MVC Data and Thymeleaf
Filed under Spring MVC
Learn the several ways that Spring MVC and Thymeleaf can work together to render data.
Gradient Descent in Java
Filed under Algorithms, Data
Learn about Gradient Descent in Java and why backtracking is so important.
How to Use Regular Expressions to Replace Tokens in Strings in Java
Filed under Algorithms, Java
Learn some regular expression strategies for replacing tokens in strings
Introduction to Apache Beam
Filed under Data
Get started with Apache Beam and this simple word counter
Organizing Layers Using Hexagonal Architecture, DDD, and Spring
Filed under Architecture, Spring
Learn how to organize application layers using Hexagonal Architecture, DDD, and Spring.
Prim’s Algorithm with a Java Implementation
Filed under Algorithms
Learn how Prim’s algorithm works and how to implement it in Java.
Introduction to Spark Graph Processing with GraphFrames
Filed under Data
Learn how to apply Page Rank, Triangular Counting, and other graph operations with Apache Spark and GraphFrames
Spring MVC Themes
Filed under Spring MVC
Learn how to apply and manage themes with Spring MVC
Remote Debugging with IntelliJ IDEA
Filed under IDE
Learn how to debug a remote Java process using IntelliJ
Defensive Copies for Collections Using AutoValue
Filed under Java
Learn what to do to ensure that AutoValue makes defensive copies in the constructors it writes.
How to Set Up a WildFly Server
Filed under Jakarta EE
Get going with WildFly in standalone or domain mode
Finding the Difference Between Two Strings in Java
Filed under Java String
Learn about libraries that give a detailed description of the difference between two strings.
Java Copy Constructor
Filed under Core Java
Here’s how to create copy constructors in Java and why to implementing Cloneable isn’t such a great idea.
FreeMarker Common Operations
Filed under Jakarta EE
Check out the most common features in FreeMarker.
JHipster Authentication with an External Service
Filed under Security, Spring Security
Learn about JHipster’s use of Spring Security and how it simplifies authenticating with an external service.
Selection Sort in Java
Filed under Algorithms
Read up on how to code selection sort in Java, how it works, and what its complexity is.
Reloading Properties Files in Spring
Filed under Spring Cloud
Learn a few approaches to getting property values to reload in Spring Beans, including Spring Cloud’s refresh scope.
Mocking a Void Method with EasyMock
Filed under Testing
Mocking void methods doesn’t have to be tricky. Learn how EasyMock makes it simple.
Removing an Element from an Array in Java
Filed under Java Array
Removing an element from an array in Java doesn’t change the size of the array. Learn why.
Setting the MySQL JDBC Timezone Using Spring Boot Configuration
Filed under Persistence, Spring Boot, Spring Data
Learn how to directly set the timezone for a MySQL JDBC Connection via Spring Boot.
Java Multi-line String
Filed under Java String
While waiting for JDK 13, what are other ways that Java supports multi-line strings?
Checking for Empty or Blank Strings in Java
Filed under Java String
Check out some simple ways in Java to test if a string is blank or empty.
Raw Types in Java
Filed under Core Java
Why are raw types problematic? Learn how and what to do about it.
Determine File Creation Date in Java
Filed under Java IO
JDK 7 introduced a way to see a file’s creation date. Learn what it is.
Introduction to SPF4J
Filed under DevOps
An in-depth look at SPF4J, using some interesting, practical scenarios.
Composite Primary Keys in JPA
Filed under JPA
Learn how to configure a JPA entity for more than one primary key column, diving into the tradeoffs between @EmbeddedId and @IdClass.
Spring Boot Embedded Tomcat Logs
Filed under Logging, Spring Boot
Tomcat’s logs are disabled by default in Spring Boot. Here’s how to enable and configure them.
JPA/Hibernate Projections
Filed under JPA
Learn how to do projections in both JPA and Hibernate.
Authenticating with Amazon Cognito Using Spring Security
Filed under Security, Spring Security
Spring Security with Amazon Cognito
Difference Between @Size, @Length, and @Column(length=value)
Filed under JPA
@Size, @Length, and @Column(length) each have their different uses on a Java POJO. Learn what they are.
Set Operations in Java
Filed under Algorithms, Java Collections
Learn the differences between union, intersection, and relative complement, and how to represent each in Java.
Persisting Maps with Hibernate
Filed under Persistence
Using a Map for a Hibernate relationship is a bit different than a List. Learn how it’s done.
Why Do Local Variables Used in Lambdas Have to Be Final or Effectively Final?
Filed under Core Java
Learn why Java requires local variables to be effectively final when used in a lambda.
Transforming an Empty String into an Empty Optional
Filed under Java String
Transforming a String into an Optional is simple in Java 8. Is going from an empty String to an empty Optional just as simple?
Programmatically Creating Sequences with Project Reactor
Filed under Reactive
Learn how to create sequences with Flux’s generate, create, and handle.
Java’s Time-Based Releases
Filed under Java
Learn about the change to time-based releases with Java, how it differs from semantic versioning and what how we can expect the support lifecycle to change
Spring Data JPA Batch Inserts
Filed under Spring Data, Spring Persistence
Learn what needs to happen for JPA Hibernate to batch inserts, and what Spring can do to help.
Ratpack with RxJava
Filed under Reactive
Learn how to add RxJava to a Ratpack server to create a nice reactive application
Iterating Over an Instance of org.json.JSONObject
Filed under JSON
Learn how to iterate and traverse through a JSONObject
Types of Strings in Groovy
Filed under Groovy
Learn the many capabilities of Groovy’s single-, double-, and tripled-quoted strings and its native support for regex, interpolation, and multi-line.
DB Integration Tests with Spring Boot and Testcontainers
Filed under Persistence, Spring Boot, Testing
Learn how to create powerful integration tests with Spring Boot and Testcontainers that connect to a dockerized database image
List Files in a Directory in Java
Filed under Java IO
Learn some different ways to list the files in a directory and subdirectories in Java.
How to Find JAVA_HOME
Learn that there is more than one way to find JAVA_HOME, including a platform-independent one.
Enabling TLS v1.2 in Java 7
Filed under Security
Learn how to upgrade the SSL socket protocol to TLS 1.2 in Java 7.
Java String Interview Questions and Answers
Filed under Java String
Prepare for your next Java interview. How many of these do you already know?
Passing Parameters to Java Threads
Filed under Java Concurrency
Learn a couple of ways to send a parameter to a thread in Java
Persist a JSON Object Using Hibernate
Filed under JSON, Persistence
Learn how attribute converters make it easy to persist JSON objects in Hibernate.
Self-Healing Applications with Kubernetes and Spring Boot
Filed under Architecture, DevOps, Spring
Learn how to weave Kubernetes, Docker, and Boot together to create applications that self-heal.
Escape JSON String in Java
Filed under JSON
Learn ways to escape a JSON String core Java or a library
One-to-One Relationship in JPA
Filed under JPA
Learn three different ways to maintain a one-to-one relationship with JPA.
Spring Boot With SQLite
Filed under Spring Boot, Spring Persistence
Configure a Spring Boot application with SQLite persistence
Gatling vs JMeter vs The Grinder: Comparing Load Test Tools
Which load testing tool is better suited for the job? Learn about JMeter’s, Gatling’s, and The Grinder’s differences to make a better selection.
A Guide to Constructors in Java
Filed under Core Java
Learn the basics about constructors in Java as well as some advanced tips
Convert Between String and Timestamp
Filed under Java Dates, Java String
Learn how to convert between String and Timestamp with a little help from LocalDateTime and Java 8.
Using Subflows in Spring Integration
Filed under Spring
Learn how subflows can simplify and empower your IntegrationFlow definitions.
Guide to BufferedReader
Filed under Java IO
Learn the basics as well as some advanced features from the BufferedReader class
Hibernate Field Naming with Spring Boot
Filed under Spring Boot, Spring Persistence
Learn how Spring Boot configures Hibernate’s field naming strategies and how to configure them yourself.
A Guide to EnumMap
Filed under Java Map
Learn why if you aren’t yet using EnumMap, you should be.
Dockerizing Java Apps using Jib
Filed under DevOps
Learn to simplify containerization of Java applications using Jib
An Introduction to Spring Data Redis Reactive
Filed under NoSQL, Spring Data
Learn the basics of using Spring Data Redis Reactive
Write an org.w3.dom.Document to a File
Filed under XML
Learn how to write and customize XML output in Java
Use the Latest Version of a Dependency in Maven
Filed under Maven
Learn how to systematically keep Maven dependencies up to date
How to Check If a Key Exists in a Map
Filed under Java Map
Learn how to check if a key exists in a Map in Java and a common pitfall.
Using Math.sin with Degrees
Filed under Algorithms
Learn how to work with Java’s trigonometric functions in degree mode.
A Quick Guide to Apache Geode
Filed under Persistence
Learn the basics of Geode’s capabilities as an in-memory data grid, including sophisticated caching and distributed computation.
Hashing a Password in Java
Filed under Algorithms, Java, Security
Learn how to securely hash passwords in Java and why MD5 is so insecure.
Serverless Functions with Spring Cloud Function
Filed under Spring Cloud
Learn how to go serverless with Spring and using Spring Cloud Functions and deploying to AWS Lambda.
Using Lombok’s @Getter for Boolean Fields
Filed under Java
Learn the convenience that Lombok’s @Getter annotation adds, as well as some of its nuances with Boolean types
Introduction to Spring Security Taglibs
Filed under Spring Security
Learn how to use Spring Security’s tag library in your JSPs for finer-grained control of your views.
Stream Ordering in Java
Filed under Java Streams
Learn about some of the underlying intricacies of Java 8 Stream ordering
Writing IntelliJ IDEA Plugins
Filed under IDE
Learn how to write your own plugins for IntelliJ IDEA
Spring Integration Java DSL
Filed under Spring
Learn the basics of the Spring Integration Java DSL as well as a few tricks
Display RSS Feed with Spring MVC
Filed under Spring MVC
Learn how to publish your own RSS feed using Spring MVC
Exception Handling in Java
Filed under Core Java
Learn the basics of exception handling in Java as well as some best and worst practices.
Calculate Age in Java
Filed under Java Dates
Learn how to easily calculate age in Java 7, Java 8, and with Joda-Time
Java with ANTLR
Filed under Java
Learn how to parse and process structure text and languages with ANTLR in Java
Access a File from the Classpath in a Spring Application
Filed under Spring
Learn how to easily open and read a file on the classpath using Spring’s Resource API
Guide to the java.util.Arrays Class
Filed under Java Array
Learn what features java.util.Arrays has, including what’s new from Java 8
Introduction to Dagger 2
Filed under Java
Learn about compile-time dependency injection with Dagger 2 and how it compares to Spring.
Introduction to Java Microservices with MSF4J
Get started building Java-based microservices with MSF4J
Programmatic Configuration with Log4j 2
Filed under Logging
Learn how to programmatically configure log4j2, merge it with existing xml config, and other helpful tips.
How to Find an Element in a List with Java
Filed under Java Collections
Have a look at some quick ways to find an element in a list in Java
Java KeyStore API
Filed under Security
Learn how to interact with java keystores programmatically.
A Guide to Java Modularity
Filed under Core Java
Learn the essentials of building and using modules in Java 9. Start down the path of modularizing your code today.
@Lookup Annotation in Spring
Filed under Spring
Learn how to effectively use the @Lookup annotation in Spring for procedural injection.
Quick Guide to java.lang.System
Filed under Core Java
Learn all the cool tips and tricks you never heard of with java.lang.System, like how to redirect System.out and safe use of System.nanoTime
Finding Min/Max in an Array with Java
Filed under Java Array
A quick intro on how to find the min/max value from a given array with the powerful Stream API in Java 8.
How to Find and Open a Class with Eclipse
Filed under IDE
Learn the quickest hotkeys and shortcuts to look up classes in Eclipse
Chain of Responsibility Design Pattern in Java
Filed under Spring
Learn about how and when to use Chain of Responsibility in Java
Instance Profile Credentials using Spring Cloud
Filed under Security, Spring Cloud
Learn to configure Spring Cloud AWS for Instance Profile Credentials.
Getting Started with Java RMI
Filed under Java
Learn how to communicate between JVMs using Java RMI.
Introduction to Java Primitives
Filed under Core Java
Learn the basics of Java’s primitive data types.
Interact with Google Sheets from Java
Filed under Cloud
Learn how to connect your Java app with Google Sheets using the Google Sheets Java Client.
Java 8 – Powerful Comparison with Lambdas
Filed under Java
Elegant Sort in Java 8 – Lambda Expressions go right past syntactic sugar and bring powerful functional semantics into Java.