Spring 6 JdbcClient: When and How to Use it?
Since Spring 6.1, JdbcClient provides a unified client API for JDBC query and update operations, offering a more fluent and simplified interaction model.
Since Spring 6.1, JdbcClient provides a unified client API for JDBC query and update operations, offering a more fluent and simplified interaction model.
Learn to configure the Log4j2 provided JDBCAppender that writes log events to a relational database table using standard JDBC. The JDBCAppender obtains the database connection from a configured connection factory or JNDI datasource. Then it uses the provided column configuration to insert a new row in the log table, everytime a log statement is executed. … Read more
If you are working on Hibernate and HSqlDB, and you are trying to fetch collection of entities, then you may face this error. For single entity you may or may not find this error. Exception will look like this: Solution This error is due to version mismatch of hibernate and hsqldb. Trying updating latest verion … Read more
Using custom SQL scripts in spring to initialize the database at startup of application with appropriate tables and data populated inside it.
Spring Boot provides various ways to load property files such as default application.properties, spring profiles, custom property files, environment variables, and system properties.
SpringExtension integrates the Spring TestContext Framework into JUnit 5 Jupiter extension model, sets up the ApplicationContext, and manages dependencies.
This guide explores the step-by-step process of containerization and running a Spring Boot application with PostgreSQL database using Podman.
This Spring vs. Spring Boot tutorial lists the differences between Spring framework and Spring Boot based on general characteristics and features.
Java records cannot be used as the replacement for JPA entities because they restrict the byte code manipulation, generally required by frameworks to work.
Learn to use Spring CrudRepository and ListCrudRepository interfaces, their differences and the changes made in Spring Data 3.0 with examples.
Learn to build REST APIs in a Spring boot application with request validation, error handling, testing and API documentation with examples.
Vaadin is a Java framework that simplifies front-end development by providing a rich set of reusable UI components and layouts. In this Spring Boot and Vaadin tutorial, we will explore the process of developing a basic CRUD application. 1. Goals Our goal is to construct a user interface that includes a table displaying the list … Read more
Learn the core concepts of configuring role-based authorization in Spring Security 6 and implementing authorization in a Spring Boot application.
Since Spring Boot 3.1, @ServiceConnection is used to provide connection details to a remote service that takes precedence over details in the properties file.
Learn to use Spring boot docker compose module, customize the compose file and container lifecycle with an example.
Learn the fundamentals of working with S3 buckets and objects using Spring Cloud AWS library and its S3Client and S3Template classes.
If you’re preparing for a job interview, these Spring security interview questions will help you understand key concepts and increase the confidence.
Learn to use Redis Pub/Sub with Spring Boot Data, and configure the message publishers and subscribers (listners) for a given channel topic.
After WebSecurityConfigurerAdapter was first deprecated and then removed in Spring Security 6, this tutorial will help in migrating to the latest version.
In Spring security tutorial, learn how it works under the hood, concepts of authentication, authorization, access control and basic configurations.
Step by step, we will learn to deploy a Spring Boot application to AWS Elastic Beanstalk which uses RDS for persisting the records in the database.
Learn the installation of the Keycloak authorization server as a docker container and different configurations for setting up the realm and testing the authorization token flow.
Learn to implement authentication with a user login and logout functionality using Vue.js and Spring Boot Security using JWT tokens.
Spring @Sql executes DDL and DML SQL scripts and statements during the integration testing. @SqlGroup groups multiple @Sql statements.
Learn to execute SQL scripts to load data (e.g. import.sql, schema.sql or data.sql) during startup of a Spring boot application or tests.
Learn to solve the ‘JdbcSQLSyntaxErrorException schema not found’ error in a Spring boot app that uses the H2 database for CRUD operations.
In this post, we will learn how to configure and manage multiple datasources using properties configuration and defining custom beans using Java annotations in Spring Boot. Note that this requirement differs from having separate datasource in test, dev and prod environments. Here, we are using multiple datasources in the same environment and each datasource can … Read more
Learn to configure and use different DataSource in different environments (test, development, production etc.) using the Spring profile specific properties files, as well as Java configuration in a Spring boot application. 1. Introduction A production grade application is deployed and tested in different environments before finally released to the end-user. In these environments, application must … Read more
Learn to install the database services such as MySQL and PostgreSQL as docker containers and connect to them from Adminer or Spring boot app.
Learn to perform integration testing using Testcontainers and JUnit 5 in a Spring boot application, including creating a @ServiceConnection.
Learn how to enable SQL logging in a Spring boot Data JPA application, print SQL statements and prepare statements with parameter values.
Learn to configure MyBatis with Spring Boot 3 and configure @Mapper and DataSource. Also, learn mapper scanning with @MapperScan with example.
In this Spring boot with Angular tutorial, learn to create REST APIs using Spring boot and call from Angular to create a CRUD application.
Spring batch is a lightweight, comprehensive framework designed for the development of robust batch processing applications. Learn with examples.
This guide lists out a few of the most asked SQL interview questions and gives their answers such as JOINS, KEYWORDS, TRIGGERS and much more.
On this page, we will frequently list the major feature changes in the latest Java release, sequentially. Though we have tried to cover as much information as possible, if you know something we have missed below, please let me know, and we will add that information. Java 22 Features Java 22 has been released on … Read more
Learn about Spring profiles, @Profile, profile-specific beans and properties, profile groups and activating a certain profile during startup.
Learn to use @PropertySource, @Value and @ConfigurationProperties annotations to register property files and inject configuration properties.
Learn to configure OAuth2 authorization-based login security in a Spring boot and spring security application with custom handlers.
Learn to configure and test a spring security login form based authentication that fetches the username, password and roles from the database.
Learn the contract spring security expects from PasswordEncoder interface, inbuilt implementations and DelegatingPasswordEncoder with examples.
This Java logging series lists down all tutorials posted under logging frameworks such as Log4j2 and Logback, for quick references.
Log4j2 provides significant improvements over its predecessor Log4j. Read about its xml and properties configuration and various examples.
These tutorials have been published to help you start with persistence with Hibernate and JPA. These are updated to version Hibernate 6.x.
Learn to create and inject an in-memory DataSource that can be used to mock J2EE container provided JNDI DataSource without running a server.
Learn to execute bulk SQL INSERT and UPDATE statements using Hibernate / JPA batch processing, and to configure session-specific batch sizes.
Hibernate provides support for executing the stored procedures and capturing their outputs using StoredProcedureQuery and ProcedureCall APIs.
Learn to implement and test the pagination functionality in hibernate using the HQL setFirstResult(), setMaxResults() and ScrollableResults.
Learn to initialize the EnitytManager using the XML configuration and the programmatic configuration in hibernate 6 and Jakarta persistence.
Learn to map Java 8 classes (LocalDate, LocalTime or LocalDateTime etc) to SQL types while storing the time-based values in the database.
HowToDoInJava provides tutorials and how-to guides on Java and related technologies.
It also shares the best practices, algorithms & solutions and frequently asked interview questions.