Skip to content

Software Development at Program Tom LTD

Place for coding, programming, development and software in general.

Menu
  • Blog
  • PDF Booklets
  • Dev Utils & Content
  • Java Spring Boot Or Web Apps
  • English
    • български
    • English
    • Español
    • Português
    • हिन्दी
    • Русский
    • Deutsch
    • Français
    • Italiano
    • العربية
  • About Us
Menu

Category: Spring

Feature Flags - Enable Functionality from the BackEnd

The 2 ways to approach Feature Flags

Posted on November 17, 2025 by Toma Velev

Feature flags (or feature toggles) allow you to enable/disable app features dynamically without redeploying code. This is useful for A/B testing, gradual rollouts, or quick fixes. Below, I’ll explain two approaches, with pros/cons, followed by code snippets in Spring Boot (backend) and Flutter (frontend). Approach 1: Unified Single Endpoint (Batch Fetch) Explanation: The backend exposes…

Read more
Feature Flags - Enable Functionality from the BackEnd

Feature Flags – Enable Functionality from the BackEnd

Posted on November 16, 2025November 16, 2025 by Toma Velev

Feature Flags let you turn features on/off dynamically from the BackEnd, without redeploying your app. They’re perfect when you want features to depend on server load, user profile, A/B tests, or any other dynamic condition. Below is a clean mental model you can directly apply (Flutter, Java backend, etc.). ✅ What Feature Flags Solve Feature…

Read more
What are ways to Optimize the backend endpoints in Spring Boot

What are ways to Optimize the backend endpoints in Spring Boot

Posted on July 12, 2025 by Toma Velev

To Optimize backend endpoints in a Spring Boot app with Java 17 can significantly improve performance and scalability. Here’s a structured list of strategies, starting from database-level optimizations and moving to application and infrastructure layers: Database/SQL Optimization ✅ Optimize SQL Queries Use EXPLAIN plans to analyze slow queries. Use proper indexing on columns used in…

Read more
Spring Boot CSV Export

Spring Boot CSV Export

Posted on June 22, 2025 by Toma Velev

Below is a Spring Boot example that demonstrates Export of data to CSV by processing records in two ways with and without library. A count() query to get the total number of records. Paging (PageRequest) to fetch records batch-by-batch. Writing directly to the response’s OutputStream to avoid holding all records in memory. ✅ Assumptions You…

Read more
How to Generate an Excel File and Download it in Vaadin Web App

How to Generate an Excel File and Download it in Vaadin Web App

Posted on May 1, 2025May 10, 2025 by Toma Velev

To generate and download an Excel file in a Vaadin web application (e.g., Vaadin 23+ with Java backend), you can use Apache POI to create the Excel file and Vaadin’s StreamResource to serve it for download. ✅ Steps: Add Apache POI to your pom.xml: <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>5.4.1</version> </dependency> Create a Vaadin download button that…

Read more
Offset of type Long in Java Object Relational Mapping Frameworks

Offset of type Long in Java Object Relational Mapping Frameworks

Posted on April 23, 2025May 10, 2025 by Toma Velev

To this day amazes me that all Java Object Relational Mapping Frameworks use 32bit Integer as parameter to the offset you could pass to the database. Spring’s Pageable uses int internally — so it cannot handle offsets beyond Integer.MAX_VALUE. (JPA API also expects int for offset and limit. https://docs.oracle.com/javaee/5/api/javax/persistence/Query.html#setFirstResult(int) Hibrnate https://docs.jboss.org/hibernate/orm/6.6/javadocs/org/hibernate/query/Page.html#page(int,int) 🔍 Breakdown: 1. Pageable…

Read more
How to pass a List in Spring Repository Query

How to pass a List in Spring Repository Query

Posted on April 5, 2025 by Toma Velev

To pass a List (or any Collection) into a Spring Data JPA repository query, you can use the IN clause in JPQL or native SQL, and Spring will automatically bind the list elements. ✅ Example 1: Using @Query with JPQL @Query(“SELECT p FROM Product p WHERE p.id IN :ids”) List<Product> findByIds(@Param(“ids”) List<Long> ids); You can…

Read more
How to return HashMap from Spring Repository

How to return HashMap from Spring Repository

Posted on April 5, 2025 by Toma Velev

A Spring Data Repository typically returns entities or List of Object arrays List<Object[]> – for custom queries, not collections like HashMap<K, V> directly. You can structure a custom query or a method that returns a Map in your Service or in additional method, but it’s not automatic — you have to be explicit about it….

Read more
Spring Boot RestController output fromat

Spring Boot RestController output fromat

Posted on March 23, 2025 by Toma Velev

Spring Boot decides which format (JSON, XML, Protobuf, etc.) to use when handling a request based on the configuration for content negotiation. 1. Content Negotiation in Spring Boot Spring Boot decides how to serialize and deserialize request/response bodies using HttpMessageConverters. These converters are automatically registered based on the libraries in the classpath. 2. How Does…

Read more
How to Optimize an Inefficient N+1 Query Problem in Spring Boot

How to Optimize an Inefficient N+1 Query Problem in Spring Boot

Posted on March 21, 2025 by Toma Velev

The N+1 query problem is a common issue that occurs when using JPA repositories in Spring Boot. It happens when you have a one-to-many or many-to-one relationship between entities, and you’re fetching the parent entity with its children. This results in a separate database query for each child, leading to inefficient performance. Optimizing N+1 Query…

Read more

Posts pagination

  • 1
  • 2
  • 3
  • 4
  • 5
  • Next
  • Jenkins SCP File Upload to Remote Server
  • Essential Programming Books – Principles & Flutter
  • Social Media Platforms 🌍
  • Strategies to prevent review regressions
  • How to set Google Map Theme in a Flutter App

Categories

  • Apps (22)
  • ChatGPT (23)
  • Choosing a Framework (38)
  • Flutter (269)
  • Graphical User Interface (14)
  • Marketing (117)
  • Software Development (286)
  • Spring (45)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (15)

Tags

Algorithms (9) crypto (29) flutterdev (39) General (86) Java (7) QR & Bar Codes (3) Software Dev Choices (33) Spring Boot (1) standards (1) Theme (3) User Authentication & Authorization (9) User Experience (10) Utilities (19) WordPress (11)

Product categories

  • All Technologies (84)
    • Flutter Apps (24)
    • GPT (4)
    • Java (38)
    • Native Android (3)
    • PHP (9)
    • Spring (Boot) / Quarkus (35)
    • Utils (15)
    • Vaadin 24+ (27)
    • Vaadin 8 (1)
  • Apps (18)
    • Employees DB (1)
    • Notes (6)
    • Personal Budget (1)
    • Recipes Book (1)
    • Stuff Organizer (1)
    • To-Do (2)
  • PDF Books (3)
  • Source Code Generators (8)

Recent Posts

  • Jenkins SCP File Upload to Remote Server
  • Essential Programming Books – Principles & Flutter
  • Social Media Platforms 🌍
  • Strategies to prevent review regressions
  • How to set Google Map Theme in a Flutter App

Post Categories

  • Apps (22)
  • ChatGPT (23)
  • Choosing a Framework (38)
  • Flutter (269)
  • Graphical User Interface (14)
  • Marketing (117)
  • Software Development (286)
  • Spring (45)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (15)