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
  • Flutter Apps
Menu

Category: Spring

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
Object Mapping - examples With Java Spring Boot

Object Mapping – examples With Java Spring Boot

Posted on March 21, 2025March 21, 2025 by Toma Velev

There are several Java Frameworks available that does Object Mapping – automatic creation of DTO (Data Transfer Object) in Spring Boot. Reasons we need it Spring (Boot) Framework saves a lot of time of developers by hiding complexity and placing smart defaults with convention over configuration. This comes with the price of a “magic” happening…

Read more
Database Integrations in Spring Boot

Database Integrations in Spring Boot

Posted on March 12, 2025 by Toma Velev

Here are minimal examples of different Database Integrations in Spring Boot that you could choose from in your applications. 1. JdbcTemplate (Plain JDBC) JdbcTemplate is a lower-level approach that directly executes SQL queries. import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.RowMapper; import org.springframework.stereotype.Repository; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; @Repository public class UserJdbcRepository { private final JdbcTemplate jdbcTemplate; public…

Read more

Posts pagination

  • 1
  • 2
  • 3
  • 4
  • 5
  • Next
  • What are ways to Optimize the backend endpoints in Spring Boot
  • Flutter image flickers
  • Could a Flutter App save a Flag even after uninstall
  • Could iOS flutter app logs be viewed while running in release mode – started after previous closed state
  • 6 Addictive Mobile Game Ideas Inspired by Flappy Bird’s Simplicity

Categories

  • Apps (20)
  • ChatGPT (19)
  • Choosing a Framework (38)
  • Flutter (206)
  • Graphical User Interface (13)
  • Marketing (114)
  • Software Development (270)
  • Spring (43)
  • StartUp (21)
  • Uncategorized (4)
  • Uncategorized (15)
  • Vaadin (14)

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 (83)
    • Flutter Apps (23)
    • 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

  • What are ways to Optimize the backend endpoints in Spring Boot
  • Flutter image flickers
  • Could a Flutter App save a Flag even after uninstall
  • Could iOS flutter app logs be viewed while running in release mode – started after previous closed state
  • 6 Addictive Mobile Game Ideas Inspired by Flappy Bird’s Simplicity

Post Categories

  • Apps (20)
  • ChatGPT (19)
  • Choosing a Framework (38)
  • Flutter (206)
  • Graphical User Interface (13)
  • Marketing (114)
  • Software Development (270)
  • Spring (43)
  • StartUp (21)
  • Uncategorized (4)
  • Uncategorized (15)
  • Vaadin (14)