Disabling peer verification in Redis is sometimes necessary in development, especially when working with self-signed certificates or testing environments. This guide covers how to do it for both Lettuce (Spring Bootโs default Redis client) and Redissonโincluding advanced approaches available for recent Redisson versions. Why Disable Peer Verification? Peer verification ensures that your client validates the … Continue reading [How-to] Disable Peer Verification in Redis for Spring Boot (Lettuce & Redisson)
Author: Dinesh Solanki
[How-To]Use AWS param store in spring boot and deploy to EKS
In modern application development, managing configuration parameters securely and efficiently is a critical task. AWS Parameter Store is a service that provides secure, hierarchical storage for configuration data management and secrets management. Let's integrate AWS Parameter Store with a Spring Boot application and optionally deploy it to EKS Prerequisites Before we start, ensure you have … Continue reading [How-To]Use AWS param store in spring boot and deploy to EKS
[How-To]Solve Infinite Recursion with @JsonBackReference in Spring Boot
When working with Spring Boot applications, especially those that utilize JPA (Java Persistence API) for database interactions, you may encounter a common pitfall: infinite recursion during JSON serialization. This often occurs when you have bidirectional relationships between entities. In this article, we'll explore how to effectively use the @JsonBackReference and @JsonManagedReference annotations to prevent infinite … Continue reading [How-To]Solve Infinite Recursion with @JsonBackReference in Spring Boot
[How-To] Create Self-Contained Executables: Convert Java Programs with GraalVM
Are you tired of your Java programs hitting roadblocks because others don't have Java installed? Say hello to GraalVM! This powerhouse tool converts your Java program into a self-contained executable, ensuring a seamless experience for all. With simple steps like setting environment variables and using Maven, you'll be up and running in no time.
Using Single Entity with JPA and Mongo DB in spring-boot
When dealing with data split across SQL and NoSQL, it's tricky to handle a single entity. While not ideal, use a combination of JPA and starter-data-mongo, carefully managing dependencies and creating different profiles. With careful entity and repository design, it's possible to make them work. Remember to separate repositories and handle case-sensitive fields. This approach offers an effective way to handle the situation.
[How-To]Enable Jenkinsfile Syntax Highlighting in IntelliJ
If you're working on a Java project that integrates with Jenkins, particularly using a Jenkinsfile for your pipeline, you might have encountered some frustrating issues with syntax highlighting and code completion in IntelliJ IDEA. Fear not! Hereโs a step-by-step guide to setting up syntax highlighting and code completion for your Jenkinsfile, while also addressing the … Continue reading [How-To]Enable Jenkinsfile Syntax Highlighting in IntelliJ
Programmatically Retrieving Log Files in Java
In any Java application, having access to log files is crucial for debugging issues, monitoring app performance, and understanding usage patterns. In this post, we'll explore different techniques for programmatically retrieving log files in Java for administrative purposes or log analysis. Getting the Log File Location First, we need to determine where the log files … Continue reading Programmatically Retrieving Log Files in Java
[Solved] Swagger JSON Import to Postman Not Working?
When developing APIs, it's common to use Swagger (OpenAPI) to define the API structure and Postman to test API calls. Swagger files can be imported into Postman to quickly generate collections for testing. However, sometimes when importing a Swagger JSON/YAML file into Postman, you may find the import fails with errors. A common cause is … Continue reading [Solved] Swagger JSON Import to Postman Not Working?
How to validate keycloak token when you have multiple realms(Multi-tenancy)
Validating JWT tokens provided by Keycloak in a Spring Boot application with multiple realms can be challenging. This blog post will provide a step-by-step guide on how to implement a custom JWT decoder that can handle multiple realms. We will also discuss how to prevent session fixation using a UserInfoFilter. This blog post is intended for Spring Boot developers who are using Keycloak for authentication and authorization. It is assumed that you have a basic understanding of JWTs and Spring Security. Here is a brief overview of the topics covered in this blog post: Configuring the custom JWT decoder Integrating the custom JWT decoder into Spring Security Implementing a UserInfoFilter to prevent session fixation By following the steps in this blog post, you will be able to validate JWT tokens provided by Keycloak in a Spring Boot application with multiple realms in a secure and efficient manner.
[HOW-TO] remote debug Tomcat spring boot application in intellij ultimate/community
In this quick tutorial, I'll explain how to setup remote debugging between your local IntelliJ IDEA and a remote Tomcat server. On the Remote Server First, edit either 'catalina.bat' (Windows) or 'catalina.sh' (Linux/MacOS) on your remote Tomcat server. Find the 'JAVA_OPTS' section and add the following option: -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 This enables remote debugging on port … Continue reading [HOW-TO] remote debug Tomcat spring boot application in intellij ultimate/community
