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….
Sell Digital Products with Flutter
At one moment in time you need to make money, so why not Sell Digital Products in Flutter apps published to the stores? This is just a variation of a previous article: https://programtom.com/dev/2024/02/20/payment-logic-the-last-software-you-need-to-code/ More on making money from Software here: https://www.linkedin.com/pulse/ways-make-money-from-software-development-toma-velev/ Flutter Pay First I’ve tried the pay package. There are a lot of links,…
Shadow on Flutter Icon
In Flutter, you can use the BoxShadow class – child property of Container to create a shadows effect around an icon or shadow property for – inside the icon. Here’s a simple example: import ‘package:flutter/material.dart’; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); @override Widget build(BuildContext…
Spring Boot RestController output fromat
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…
Velocity Templates Every day Features
Velocity Templates are a powerful templating engine that allows outputting custom content in your format with most basic case – HTML. I’ve written very basic example with Spring Boot. Here are some everyday features of Velocity templates that you could use: Variables You can define variables in the template and use them throughout the page….
50 Software Platforms of Producers and Consumers
Here are various areas where Software Platforms connect Producers and Consumers in different areas. You will find that most of the Big Internet Platforms are like that. E-commerce & Retail General Marketplaces – Amazon, eBay, AliExpress Handmade & Artisanal Goods – Etsy, Wholesale & B2B Marketplaces – Alibaba, Faire Real Estate & Property Property Listings…
How to Optimize an Inefficient N+1 Query Problem in Spring Boot
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…
Object Mapping – examples With Java Spring Boot
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…
Java Web Applications
The Internet evolved so much the last 20 years that – It has becomed impossible to create indepedently Java Web Applications – without JavaScript, CSS, TypeScript, the HTTP protocol and all the technical details of the Web. Here are the most close attempts. Vaadin Web Applications Vaadin Framework is the king of abstracting the Web…
Database Integrations in Spring Boot
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…