Tag Archives: java

Running Spring Boot application with springdoc-openapi behind NGINX

Suppose you want all requests prefixed with /api to be forwarded by NGINX to spring boot. There are 2 common options: So when a request like GET /api/foo is made when it reaches spring boot, spring boot sees a request … Continue reading

Posted in Computers, programming, Software | Tagged , | Leave a comment

Not able to play audio in Java

Posted in Computers, programming, Software | Tagged | Leave a comment

Introducing Honeybadger.bot: Java Class Registry

What is the biggest pain point you encounter with Java development? For me, its debugging those ClassNotFound exceptions and not knowing what dependency I need to add to my pom.xml in order to use a class [1,2]. Fortunately there is … Continue reading

Posted in Computers, programming, Software | Tagged | Leave a comment

Spring Boot controller not working

Some tips to help you debug Spring controller not working. There can be many reasons why this can happen. Here is a checklist: In separate terminal window type: Now you want to set a breakpoint at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan: Then run the … Continue reading

Posted in Computers, programming, Software | Tagged , , | Leave a comment

Generics vs Interfaces in Java

There is an important lesson I realized w.r.t. using Generics vs. Interfaces in Java today. It has to do with this: Another benefit of using generics is that you don’t need to typecast all the time when using fields or … Continue reading

Posted in Computers, programming, Software | Tagged | Leave a comment

Persistent key-value store in Java

Sometimes you need to store key-value data (i.e., a dictionary, associative array or HashMap) in your application. Using a full blown RDMS can do it but is perhaps overkill. What you are looking for is instead a library that can … Continue reading

Posted in Computers, programming, Software | Tagged | 2 Comments

Understanding Internals of Project Loom: 10 Things You Should Know About Java Virtual Threads

TL;DR: Where to go from here:

Posted in Computers, programming, Software | Tagged | Leave a comment

How to read/write HDF5 files in Java

there are 2 things you need for this: WARNING: You will need JDK 20 because the Java wrapper has been compiled with JDK 20 (when I wrote this blog post). If you have earlier version of JDK you will get … Continue reading

Posted in Computers, programming, Software | Tagged , | 1 Comment

Java vs. Node.js: Performance comparison of blocking vs. non-blocking I/O

There are many online articles touting the advantages of non-blocking I/O over blocking I/O. But I wanted to see the difference for myself. So to do that, I developed an application two ways: one using Spring WebMVC + JPA which … Continue reading

Posted in Computers, programming, Software | Tagged , , , , | Leave a comment

Step by step guide to profiling Java applications with VisualVM

VisualVM is a great tool to profile your Java applications. Here I describe the steps I followed to get it working. The steps are wrt Visual VM 2.1.4. I installed VisualVM by downloading the dmg file from their website. Then … Continue reading

Posted in Computers, programming, Software | Tagged , , | Leave a comment