We’ll demonstrate how to handle exceptions in Feign in a Spring Boot project.
Also find me here:
Baeldung Editor
Greg Martin
Greg has over 20 years of software engineering experience and currently writes analytic code for a cybersecurity company. His main focus is Java but he has worked with many other languages including Perl, Ruby, Scala, and Kotlin. When not coding, Greg likes going to concerts and movies.
Here's what I've reviewed (so far):
Baeldung on Java
- All
- Spring Boot (10)
- Java (9)
- Security (6)
- Java Concurrency (6)
- REST (5)
- Spring Web (4)
- Spring Security (4)
- JPA (4)
- Core Java (4)
- Spring (3)
- Persistence (3)
- Java String (3)
- JVM (3)
- Gradle (3)
- Testing (2)
- Spring Cloud (2)
- Reactive (2)
- NoSQL (2)
- Maven (2)
- Java Array (2)
- XML (1)
- Spring MVC (1)
- Spring Data (1)
- Logging (1)
- Java Numbers (1)
- Java Map (1)
- Java IO (1)
- Java Collections (1)
- Data (1)
- Algorithms (1)
UUID as Entity ID in MongoDB
Filed under Spring Data
Learn to use a UUID as an entity ID in MongoDB.
Handle Spring Security Exceptions With @ExceptionHandler
Filed under Spring Security
Learn to handle Spring Security Exceptions with @ExceptionHandler.
RequestLine with Feign Client
Filed under REST
Learn how to use @RequestLine annotation in Feign client.
Get Keycloak User ID in Spring
Filed under Spring Security
Learn to get the Keycloak user ID in a Spring Boot application.
Single Sign On Solutions for Java Applications
Filed under Security
Learn about some common single sign-on solutions for Java applications.
Common Command-Line Compile Errors in Java
Filed under Java
Learn about some common command-line compile errors in Java.
Getting Started With GraphQL SPQR and Spring Boot
Filed under Spring Boot
Learn about GraphQL SPQR and Spring Boot.
Retrieve Original Message From Feign ErrorDecoder
Filed under REST
Learn to retrieve the original message from Feign ErrorDecoder.
Provide an OAuth2 Token to a Feign Client
Filed under Security, Spring Cloud
Learn to provide an OAuth2 token to a feign client.
Failed to Load ApplicationContext for JUnit Test of Spring Controller
Learn about the “Failed to Load ApplicationContext” error message when running Junit tests with the Spring Controller, and how to fix it.
Set the Name of a Thread in Java
Filed under Java Concurrency
Learn to set a Thread name in Java.
HMAC in Java
Filed under Security
Learn how to work with the HMAC algorithm in Java.
Best Practices for Unit Testing in Java
Filed under Testing
Learn about best practices for unit testing in Java.
Serialization Validation in Java
Filed under Core Java
Learn about validating serializable objects in Java.
Consistency Levels in Cassandra
Filed under NoSQL, Persistence
Learn about consistency levels in Cassandra.
Handling Exceptions in Project Reactor
Filed under Reactive
Learn about exception handling in project Reactor.
Throwing Exceptions in Constructors
Filed under Core Java
Learn about throwing exceptions in a constructor.
Writing Log Data to Syslog Using Log4j2
Filed under Logging, Spring Boot
Learn to write log data to Syslog using Log4j2 and Spring Boot.
Converting String to BigInteger in Java
Filed under Java String
Learn to convert a String to a BigInteger in Java.
Swagger @Api Description Is Deprecated
Filed under REST
Learn alternatives to the deprecated description attribute with Swagger 2 and OpenAPI 3.
3DES in Java
Filed under Security
Learn to create 3DES keys and use them for encrypting and decrypting Strings and files in Java
A Comparison Between JPA and JDBC
Filed under JPA
Learn about the differences between JPA and JDBC.
Interface With Default Methods vs Abstract Class
Filed under Core Java
Learn the differences between interfaces with default methods and abstract classes in Java.
Referencing a Method in Javadoc Comments
Filed under Java
Learn to reference a method in Javadoc comments.
Maximum Size of Java Arrays
Filed under Java Array
Learn about the maximum size of Java arrays.
Getting the Java Version at Runtime
Filed under Java
Learn to find the Java version at runtime.
How to Convert Mono<List<T>> Into Flux<T>
Filed under Reactive
Learn to convert a Mono of a collection to Flux of the collection’s items.
CRUD Application With React and Spring Boot
Filed under REST, Spring Boot
Learn to create, and deploy, a full CRUD application with React and Spring Boot.
Convert an Array of Primitives to an Array of Objects
Filed under Java Array
Learn to convert an array of primitives to an array of objects.
TLS Setup in Spring
Learn how to set up TLS in Spring.
Count Query In jOOQ
Filed under Persistence
Learn different ways to perform a record count with jOOQ.
Get All Endpoints in Spring Boot
Filed under REST, Spring Boot
Learn to find all endpoints for a Spring Boot REST application.
Spring Security OAuth Authorization Server
Filed under Spring Security
Learn how to use the Spring Security OAuth Authorization Server.
Collections.synchronizedMap vs. ConcurrentHashMap
Filed under Java Concurrency, Java Map
Learn the differences between Collections.synchronizedMap and ConcurrentHashMap.
DispatcherServlet and web.xml in Spring Boot
Filed under Spring Boot, Spring Web
Learn how to migrate code from a web.xml file to DispatcherServlet in a Spring Boot application.
Java IndexOutOfBoundsException “Source Does Not Fit in Dest”
Filed under Java Collections
Learn about the IndexOutOfBoundsException: “Source does not fit in dest” in Java.
Dependency Management in Gradle
Filed under Gradle
Learn to manage dependencies in Gradle.
JPA Entity Equality
Filed under JPA
Learn about entity equality in the JPA.
XML Defined Beans in Spring Boot
Filed under Spring Boot, XML
Learn about XML defined beans in Spring Boot.
Accessing Maven Properties in Java
Filed under Maven
Learn how to access Maven properties in Java.
Garbage Collection Logging to a File in Java
Filed under JVM
Learn how to log garbage collection information to a file in Java.
Spring Security vs Apache Shiro
Filed under Security, Spring Security
Learn about Spring Security and Apache Shiro.
Number Formatting in Java
Filed under Java Numbers
Learn to format numbers in Java.
Converting a Spring MultipartFile to a File
Filed under Spring Web
Learn to convert a Spring MultipartFile to a File.
Circular View Path Error
Filed under Spring Web
Learn about the Circular View Path error in a Spring Boot project.
What Causes java.lang.OutOfMemoryError: unable to create new native thread
Filed under Java Concurrency
Learn about what causes the java.lang.OutOfMemoryError: unable to create new native thread error.
Comparing Objects in Java
Filed under Core Java
Learn about comparing objects in Java.
Formatting Currencies in Spring Using Thymeleaf
Filed under Spring Web
Learn to format currencies in Spring using Thymeleaf.
Generating PDF Files Using Thymeleaf
Filed under Spring MVC
Learn how to generate PDF files using Thymeleaf.
AWS AppSync With Spring Boot
Filed under Spring
Learn how to use AWS AppSync with Spring Boot.
Spring JPA @Embedded and @EmbeddedId
Filed under JPA
Learn how to use the @EmbeddeId and @Embeddable annotations to represent composite keys in JPA entities.
Memcached vs Redis
Filed under NoSQL, Persistence
Learn about the similarities and differences between Memcached and Redis.
Constructing a JPA Query Between Unrelated Entities
Filed under JPA
Learn to construct a JPA query between unrelated entities.
Helpful NullPointerExceptions in Java 14
Filed under Java
Learn about helpful NullPointerExceptions in Java 14.
Intro to Coroutines with Quasar
Filed under Java Concurrency
Learn to implement coroutines in Java using Quasar.
Fixing “constant string too long” Build Error
Filed under Java String
Learn to fix the “constant string too long” build error in Java.
Java IO vs NIO
Filed under Java IO
Learn about the Java IO and NIO libraries and how they differ.
Using NullAway to Avoid NullPointerExceptions
Filed under Java
Learn how to avoid NullPointerExceptions using NullAway.
Java Suppressed Exceptions
Filed under Java
Learn about suppressed Exceptions in Java and how to work with them.
ThreadPoolTaskExecutor corePoolSize vs. maxPoolSize
Filed under Java Concurrency
Learn about the corePoolSize and maxPoolSize properties in the ThreadPoolTaskExecutor.
Converting Gradle Build File to Maven POM
Learn to convert a Gradle build file to a Maven pom.xml.
The BeanDefinitionOverrideException in Spring Boot
Filed under Spring Boot
Learn about the BeanDefinitionOverrideException in Spring Boot, and how to work with it.
Spring Projects Version Naming Scheme
Filed under Spring Boot
Learn about the naming schemas in Spring.
Case-Insensitive String Matching in Java
Filed under Java String
Learn how to perform case-insensitive String matching in Java.
What’s New in Gradle 6.0
Filed under Gradle
Learn about new features in Gradle 6.0.
Guide to Work Stealing in Java
Filed under Java Concurrency
Learn about work stealing in Java.
Balanced Brackets Algorithm in Java
Filed under Algorithms, Java
Learn how to address the problem of Balanced Brackets, also known as Balanced Parentheses, with Java.
What Causes java.lang.reflect.InvocationTargetException?
Filed under Java
Learn what Causes java.lang.reflect.InvocationTargetException.
Apache RocketMQ with Spring Boot
Filed under Data, Spring Boot
Learn how to use Apache RocketMQ with Spring Boot.
How to Print a Binary Tree Diagram
Filed under Java
Learn how to print a binary tree diagram.
Runtime.getRuntime().halt() vs System.exit() in Java
Filed under JVM
Learn the differences between Runtime.getRuntime().halt() and System.exit() in Java.
Adding Shutdown Hooks for JVM Applications
Filed under JVM
Learn to add shutdown hooks for JVM applications.
Disable Spring Boot Banner at Startup
Filed under Spring Boot
Learn to disable the Spring Boot banner at the startup of an application.