An overview of the most common reasons for getting UnsatisfiedDependencyException, and how to fix it
Also find me here:
Baeldung Editor
Predrag Marić
Software Engineer in the core, but also exploring some other IT roles. Trying to keep up with the industry pace, improving the existing knowledge and expanding it along the way.
Here's what I've reviewed (so far):
Baeldung on Java
- All
- Java (17)
- Spring (10)
- Spring Boot (8)
- Java Collections (8)
- Data (8)
- Testing (6)
- Java Concurrency (6)
- Core Java (6)
- Persistence (5)
- Java String (5)
- Guava (5)
- Reactive (4)
- REST (4)
- Java Map (4)
- JVM (4)
- Spring MVC (3)
- NoSQL (3)
- Maven (3)
- Java IO (3)
- DevOps (3)
- Cloud (3)
- Algorithms (3)
- Spring Persistence (2)
- Security (2)
- Logging (2)
- Jakarta EE (2)
- HTTP Client-Side (2)
- Architecture (2)
- Spring Web (1)
- Spring Data (1)
- Java Streams (1)
- Java Numbers (1)
- Java Dates (1)
- Jackson (1)
- JSON (1)
- Gradle (1)
Spring Vault
Learn about what Spring has to offer when working with Vault – a popular tool to store and secure secrets
Calculate the Distance Between Two Points in Java
Filed under Algorithms
A quick Java solution for a simple math problem of finding the distance between two points
Synthetic Constructs in Java
Filed under Core Java
Learn about the compiler-added binding code pieces that enable transparent usage of some of Java’s features
Find the Intersection of Two Lines in Java
Filed under Algorithms, Java
A quick take on a Java solution for a simple math problem
Deploying a Spring Boot Application to Cloud Foundry
Learn about the steps necessary to put your application up on Cloud Foundry
Integration Testing with Maven
An in-depth guide to configuring and running integration tests using Maven
Configuring a Hikari Connection Pool with Spring Boot
Filed under Persistence, Spring Boot
Learn how you can configure Hikari CP in your Spring Boot (1 and 2) applications
Spring Component Scanning
Filed under Spring Boot
Learn about the mechanism behind Spring component scanning, and how you can tweak it to your own needs
Hibernate Entity Lifecycle
Filed under Persistence
An overview and explanation of the states Hibernate entities go through in their lifecycle
Testing an Abstract Class With JUnit
Filed under Testing
Learn about specifics of unit testing abstract classes, covered with examples and pros/cons.
State Design Pattern in Java
Filed under Java
Learn about State design pattern and its pros and cons, explained with a clear and easy to understand example
Running JUnit Tests Programmatically, from a Java Application
Filed under Testing
A quick tutorial on running JUnit tests from your Java code
Logging Exceptions Using SLF4J
Filed under Logging
Quick overview of exception logging with SLF4J logging abstraction
A Simple Guide to Connection Pooling in Java
Filed under Persistence
A quick overview of several popular connection pooling solutions, plus a quick dive into a custom connection pool implementation
Parsing YAML with SnakeYAML
Filed under Java
An overview of parsing simple and not so simple YAML documents into Java objects – and vice versa – using SnakeYAML library.
Spring Session with JDBC
Filed under Spring Persistence
Learn how you can seamlessly persist your session information into a database using Spring Session JDBC
Remove the First Element from a List
Filed under Java Collections
A quick overview of a few ways of removing the first element from a list in Java.
How to Convert List to Map in Java
Filed under Java Map
Learn about different ways of converting a List to a Map in Java, using core functionalities and some popular libraries
Getting a File’s Mime Type in Java
Filed under Java IO
An overview of various ways to get a file’s MIME type
Increment Date in Java
Filed under Java Dates
An overview of various core and 3rd party methods for adding days to a date
Image to Base64 String Conversion
Filed under Java String
A quick overview of converting an image to Base64 String and back
Java Global Exception Handler
Filed under Java
Learn how to globally handle all uncaught exceptions in your Java application
Create a Symbolic Link with Java
Filed under Java IO
Learn about symbolic links, and how to create them with Java
Iterating Backward Through a List
Filed under Java Collections
Learn about various ways you can iterate through a list backwards, including some popular third-party libraries
Guide to Maven Archetype
Filed under Maven
Learn what Maven archetypes are used for, and how you can create your own
Immutable Objects in Java
Filed under Core Java
Learn about immutability and how you can achieve it in a Java object.
Introduction to JavaPoet
Filed under Java
Learn how you can generate Java code with the JavaPoet library
Working with Select and Option in Thymeleaf
Filed under Spring MVC
Learn how to handle a common case of using Select with Option tags in Thymeleaf.
Find the Middle Element of a Linked List in Java
Filed under Java Collections
Learn how you can tackle the common problem of finding the middle element of a linked list
JUnit5 Programmatic Extension Registration with @RegisterExtension
Filed under Testing
An overview of JUnit 5 @RegisterExtension annotation along with examples of use
Spring Data Reactive Repositories with MongoDB
Filed under NoSQL, Spring Data
Learn how you can use Spring’s reactive repositories with MongoDB at the persistence end
Download a File From an URL in Java
Filed under Java IO
Explore the different ways of downloading a file in Java.
Using the Spring RestTemplate Interceptor
Filed under HTTP Client-Side, Spring Web
Learn about using interceptors in your Spring application with the RestTemplate.
Java main() Method Explained
Filed under Core Java
Learn about the standard Java main() method along with some uncommon, but still supported, ways of writing it.
Run an Ant Task with Maven
Filed under Maven
Learn how you can easily invoke Ant tasks from your Maven build
@Order in Spring
Filed under Spring
A quick overview of Spring’s @Order annotation with a simple example
Spring Boot Change Context Path
Filed under Spring Boot
Learn various ways of changing the context path in your Spring Boot application
Show Hibernate/JPA SQL Statements from Spring Boot
Filed under Logging, Spring Boot, Spring Persistence
Learn how you can configure logging of the generated SQL statements in your Spring Boot application.
Command-Line Arguments in Spring Boot
Filed under Spring Boot
Learn how to pass arguments from command line into your Spring Boot application
Displaying Money Amounts in Words
Filed under Algorithms
A simple Java solution to an interesting problem of printing a numerical amount of money with words.
Java 8 Math New Methods
Filed under Core Java
Learn about the new Math methods brought by Java 8
Introduction to Apache Curator
Learn how Apache Curator can help you coordinate your services
An MVC Example with Servlets and JSP
Filed under Architecture, Jakarta EE
Learn how you can create an application that implements MVC pattern, using Servlets and JSP pages.
Object Type Casting in Java
Filed under Core Java
An overview of type casting in Java, covered with simple and easy to understand examples.
A Guide to Infinispan in Java
Filed under Persistence
Learn how you can use Infinispan as a caching solution for your app.
Introduction to Smooks
Filed under Data
Learn how Smooks can help you with common data transformations.
The Observer Pattern in Java
Filed under Spring
Learn a few ways to implement the Observer design pattern in Java
A Simple Tagging Implementation with Elasticsearch
Learn how you can extend your Elasticsearch project with a tagging implementation
Weak References in Java
Filed under JVM
Learn about Weak References in Java and their common usage scenarios
Phantom References in Java
Filed under JVM
Learn about Phantom References in Java and their common usage scenarios.
Soft References in Java
Filed under JVM
Learn about soft references in Java and how they can be used.
Getting Started With Mule ESB
Filed under Data
Learn the basics of Mule ESB – a lightweight Java-based Enterprise Service Bus.
Creating a MS PowerPoint Presentation in Java
Filed under Java
Quick and practical example of creating PowerPoint presentations using Java and Apache POI.
Guide to java.util.Formatter
Filed under Java String
Introduction to formatting Strings in Java using the java.util.Formatter.
Introduction to Gradle
Filed under Gradle
Discover core concepts of one of the most popular build tools – Gradle.
Challenges in Java 8
Filed under Java
The other side of the coin of Java 8.
Activiti Kickstart App and Activiti Rest Webapp
Filed under Java
Learn how Activiti’s two apps, activiti-app and activiti-rest, can help you manage your processes more easily
ProcessEngine Configuration in Activiti
Filed under Java
Learn about various ways of obtaining ProcessEngine and how to set up a database with Activiti.
Compact Strings in Java 9
Filed under Java String
Discover Compact Strings – a new Java 9 feature.
Generate Spring Boot REST Client with Swagger
Filed under REST, Spring Boot
Learn how you can generate a Spring Boot REST client using Swagger Code generator.
Trampoline – Managing Spring Boot Applications Locally
Filed under DevOps, Spring Boot
Introducing Trampoline – a tool that will ease working with microservices in your local environment
StringBuilder vs StringBuffer in Java
Filed under Java String
An overview of Java’s StringBuilder and StringBuffer, pointing out similarities and differences.
Integrating Retrofit with RxJava
Filed under REST
Learn how to use RxJava features with Retrofit.
How to Iterate Over a Stream With Indices
Filed under Java Streams
Learn several ways of iterating over Java 8 Streams using indices
OutOfMemoryError: GC Overhead Limit Exceeded
Filed under JVM
Learn about the OOM – GC Overhead Limit Exceeded, its causes and ways to solve it.
How to Round a Number to N Decimal Places in Java
Filed under Java Numbers
Overview of several ways of handling the common problem of rounding a decimal number in Java
Introduction to JUnitParams
Filed under Testing
A quick and practical guide to a very useful library which will help you write parameterized unit tests – JUnitParams.
Software Transactional Memory in Java Using Multiverse
Learn how you can implement STM in your application with the help of Multiverse library.
How to Remove the Last Character of a String?
Filed under Java String
Learn how to remove the last character of a String with core Java or using external libraries.
Guide to Guava MinMaxPriorityQueue and EvictingQueue
Filed under Guava
A quick guide to two interesting queue implementations from Guava library.
The StackOverflowError in Java
Filed under Core Java
Learn how one of Java’s most common errors – StackOverflowError – occurs, and how to resolve it.
Guide to the Java Phaser
Filed under Java Concurrency
Learn how Java’s Phaser API can help you deal with advanced thread coordination tasks.
Guide to CopyOnWriteArrayList
Filed under Java Collections
A quick overview of Java’s CopyOnWriteArrayList and its most common usages.
Quick Guide to Spring Roo
Filed under Spring
Learn how to use Spring Roo – a rapid Java applications development tool
Using Java MappedByteBuffer
Filed under Java
A short overview of how MappedByteBuffer can be used for high-performance file manipulation.
LongAdder and LongAccumulator in Java
Filed under Java
Learn how LongAdder and LongAccumulator can aid you in your multi-threaded applications
Guide to the ConcurrentSkipListMap
Filed under Java Concurrency, Java Map
A quick introduction to Java’s ConcurrentSkipListMap, with an example of the typical usage
Guide to the Java TransferQueue
Filed under Java Collections
Learn how the Java’s TransferQueue can help you in writing multithreaded applications.
A Guide to Java SynchronousQueue
Filed under Java Collections
Learn how you can utilize Java’s SynchronousQueue to help you coordinate the work of multiple threads.
Guide to sun.misc.Unsafe
Filed under Java
Learn how to take advantage of sun.misc.Unsafe‘s interesting methods, which span outside of the usual Java usage
REST Query Language – Implementing OR Operation
Learn how to extend the possibilities of your API by implementing the OR query operation
Guide to Reactive Microservices Using Lagom Framework
Filed under Architecture, Reactive
Learn how to write a real application based on microservices using the Lagom framework.
HTTP PUT vs HTTP PATCH in a REST API
Filed under REST, Spring MVC
Learn about the difference between PUT and PATCH HTTP methods, and their implications when building your Spring API.
Intro to JHipster
Filed under Spring Boot
Learn how to get started with JHipster by creating a first, simple application.
Jackson Streaming API
A quick overview of Jackson’s Streaming API for processing JSON, including the examples
Property Testing Example With Vavr
Filed under Testing
Learn about Property Based Testing, and how Vavr library makes writing them easy.
Introduction to Javassist
Filed under Java
Introduction to Javassist – a bytecode manipulation library, covering its basic features.
Introduction to Google Protocol Buffer
Filed under Data
Learn the basic concepts of the Google’s Protocol Buffers demonstrated on a simple example.
A Guide to the Axon Framework
Filed under Data
An intro to the Axon framework (v4) by building a simple CQRS and Event Sourcing example application.
HBase with Java
Filed under Persistence
Introduction to HBase database and interaction with it using the Java client.
Intro to Jasypt
Filed under Security
Quick Jasypt library overview, including simple examples and typical usage scenarios.
Guide to Guava’s Reflection Utilities
Filed under Guava
Introduction to Guava’s Reflection API, with examples of the most common usages.
Intro To Reactor Core
Filed under Reactive
Introduction to Reactor Core project, covering the basic concepts
Introduction to cglib
Filed under Java
Overview of cglib – the popular code generation library, its features and most common use cases
AWS Lambda Using DynamoDB With Java
Introducing AWS Lambda and DynamoDB combination, including configuration steps and demo application.
Introduction to jOOL
Filed under Java
Introducing jOOL’s main features, with typical usage examples
Advanced Apache HttpClient Configuration
Filed under HTTP Client-Side
HttpClient configurations for advanced use cases.
Introduction to Guava CacheLoader
Filed under Guava
A short introduction to Guava’s CacheLoader and its usage.
How to Test RxJava?
Filed under Reactive
An intro to the way we can test our RxJava logic.
Strategy Design Pattern in Java 8
Filed under Spring
Implementation of Strategy design pattern in the light of Java 8 features.
Guide to WeakHashMap in Java
Filed under Java Map
Explaining the WeakHashMap, how it works, when to use it, and a small example.
Avoiding the ConcurrentModificationException in Java
Filed under Java Concurrency
A short insight in Java’s ConcurrentModificationException, why it happens and how to avoid it.
Guide to PriorityBlockingQueue in Java
Filed under Java Collections
Introduction to Java’s PriorityBlockingQueue with usage examples
Dealing with Backpressure with RxJava
Filed under Reactive
A guide demonstrating several strategies of handling backpressure in RxJava
Working with Apache Thrift
Filed under Data
Introduction to Apache Thrift with instructions on how to build a sample application
Guide to Guava’s Ordering
Filed under Guava
A guide to Guava’s Ordering class, with typical usage examples.
Guide to java.util.concurrent.Future
Filed under Java Concurrency
A guide to java.util.concurrent.Future with an overview of its several implementations
Intro to Dropwizard Metrics
Filed under DevOps
A practical overview of Dropwizard metrics and several of its modules.
Guide to java.util.concurrent.BlockingQueue
Filed under Java Collections, Java Concurrency
Overview of java.util.concurrent.BlockingQueue with a usage example
Guide to CountDownLatch in Java
Filed under Java Concurrency
A guide to java.util.concurrent.CountDownLatch with concrete examples
JSON Processing in Java EE 7
Filed under Jakarta EE, JSON
A quick and practical guide to handling JSON in Java EE 7
Guide to Guava Multimap
A short guide to Guava Multimap in comparison with standard java.util.Map
Messaging with Spring AMQP
Filed under Spring
Introduction to Spring AMQP, JMS and AMQP in general
A Custom Data Binder in Spring MVC
Filed under Spring MVC
Learn to create and configure a custom data binder in Spring MVC.
Working with Images in Java
A quick overview of several Java image-processing libraries, including a simple example done in all of them