Skip to content

datmt

  • Home
  • Tutorials
    • backend
      • java
        • spring
        • JPA
        • javaee
    • devops
    • frontend
    • Linux
    • NoSQL Databases
  • Privacy Policy
  • Cookie Policy (EU)
  • Contact

java

Implement SSE with Spring Boot And Angular

July 20, 2023July 20, 2023 by Đạt Trần
Implement SSE with Spring Boot And Angular

Overview Recently I worked on a web app that needed to call an external API. The web app comprises an Angular (16) client and a Spring Boot (3) server. The call to that external API can be slow (up to 30 seconds). Cases like this are ideal for using multithreading. In this post, I will … Read more

Categories java Tags angular, spring boot, sse Leave a comment

Fix Null SecurityContext In Spring Multi-Threading (@Async)

June 14, 2023 by Đạt Trần
Fix Null SecurityContext In Spring Multi-Threading

Overview When you start using multiple threads in Spring applications, many funny things happen. At least this was my experience. My use case is I have one endpoint that takes an audio file. The file would go through two services: As I want to return the result of the speech-to-text service immediately, the upload part … Read more

Categories java Tags @async, multi-threading, spring Leave a comment

Using Interface In Spring Boot @RequestBody

July 31, 2023June 7, 2023 by Đạt Trần
Using Interface In Spring Boot @RequestBody

Overview Recently, for the first time, I encounter a need to use an interface in @RequestBody in my Spring Boot app. Here is the diagram: This is the request that contains one IAudioContent However, when I sent a request to create a question group with TTSSingleRequest in JSON format for example, I got the following … Read more

Categories java Tags jackson, java, spring boot Leave a comment

Integrate Keycloak With Spring Boot 3

February 21, 2023 by Đạt Trần
Integrate Keycloak With Spring Boot 3

Overview Spring Boot 3 came out with a lot of promises. The most prominent thing is the native image build. I currently deploy my apps as a fat jar in containers with JRE and it took around 20s to boot up. Thus, I would love to try the native build to see if is there … Read more

Categories java Tags java, keycloak, spring boot Leave a comment

4 Ways To Read Text Files In Java 8+ (without External Libraries)

January 31, 2023 by Đạt Trần
4 Ways To Read Text Files In Java

Overview Reading files is quite a common task in Java programming, and there are several ways to do so without relying on external libraries. In this tutorial, we will discuss four different ways to read text files in Java 8+ using built-in classes and APIs. We will go over examples of how to read text … Read more

Categories java Leave a comment

[Java Concurrency] ThreadLocal Tutorial

January 18, 2023 by Đạt Trần
ThreadLocal Tutorial

Overview ThreadLocal provides a mechanism where multiple threads can store their own data on a single ThreadLocal object. You can think of ThreadLocal as a bank. Multiple can go to a single bank, deposit, and withdraw money. It is also the analogy of this tutorial. ThreadLocal Quick Example Using the bank analogy, let’s say there … Read more

Categories java Tags java concurrency, threadlocal Leave a comment
Older posts
Newer posts
← Previous Page1 … Page7 Page8 Page9 … Page16 Next →
  • Architecture
  • backend
  • Clean Code
  • Cloud Computing
  • Databases
  • devops
  • frontend
  • fundamental
  • General Tips
  • git
  • java
  • javaee
  • JPA
  • kubernetes
  • Linux
  • management
  • mobile development
  • network
  • NoSQL Databases
  • opensource
  • python
  • quarkus
  • Relational Databases
  • scala
  • Security
  • spring
  • SQL
  • System Design
  • WordPress Development

Copyright Ⓒ datmt

© 2025 datmt • Built with GeneratePress