Using Request Methods with RestTemplate in Spring

What is RestTemplate? RestTemplate is a template class in the Spring framework for accessing RESTful services. It provides a set of convenient methods to send HTTP requests and handle responses. RestTemplate can be used to send GET, POST, PUT, DELETE and other types of requests, and can handle response data in various formats such as JSON and X ...

Posted on Sat, 17 Oct 2026 16:30:27 +0000 by Sulphy

Spring AOP Fundamentals: Concepts and Practical Implementation

Transaction-Enabled Transfer Example 1.1 Implementation Data Access Layer Database Connection Utility Transaction Management Utility bean.xml Configuration 1.2 Service Layer Transaction Control Issues Transfer Control Using Proxy Pattern 2.1 Proxy Pattern Review Interface-Based Dynamic Proxy Class-Based Dynamic Proxy ...

Posted on Thu, 15 Oct 2026 16:47:53 +0000 by system_critical

Injecting Collections via Spring XML Configuration

Defining a Bean with Primitive Collection Fields To inject collections of primitive types, first define a class containing the necessary data structures. package com.example.model; import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Set; public class PrimitiveCollectionHolder { private Long identifi ...

Posted on Wed, 14 Oct 2026 16:49:21 +0000 by whitmard

Spring JdbcTemplate for Database CRUD Operations

Required external JAR packages: mysql-connector-java druid Configuring Druid Connection Pool <!--Database connection pool configuration--> <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" destroy-method="close"> <property name="url" value="jdbc:mysql://local ...

Posted on Mon, 12 Oct 2026 16:17:01 +0000 by Sharif

Core Components of Spring Bean Management

The foundation of Spring's bean management system revolves around several key components that work together to define, instantiate, and manage beans. Below is a simplified implemantation illustrating these core concepts. BeanDefinition: Metadata Container for Beans BeanDefinition acts as a metadata holder for a bean, storing information such as ...

Posted on Fri, 09 Oct 2026 16:05:25 +0000 by flashback

Java-Based Smart Parking Management System

System Overview Urban vehicle density has surged, creating significant challenges in locating available parking. Drivers often waste considerable time circling blocks to find a spot. This parking management application addresses the issue by providing real-time visibility into parking availability, enabling drivers to quickly identify and secur ...

Posted on Wed, 07 Oct 2026 16:24:05 +0000 by aravind_mg

Managing Bean Registration in a Spring Container

Missing Bean Detection A class marked with @Component may still be unavailable during autowiring if the Spring context does not scan its package. Consider the following class: @Component public class Calculator { public int add() { return 42; } } Attempting to inject it in a test without proper container configuration will resu ...

Posted on Mon, 05 Oct 2026 16:21:54 +0000 by fighnight

Understanding Spring IOC and Bean Management

Spring IOC Inversion of Control transfers the responsibility of object creation, initialization, and destruction to the Spring container, which manages the complete lifecycle of objects. Initializing the Spring Container Classpath-based configurasion The XML configuration file must reside within the classpath: ApplicationContext context = new C ...

Posted on Tue, 29 Sep 2026 17:00:30 +0000 by KMC1499

Common Spring IoC Annotations and Their Usage

@Component The @Component annotation signals Spring's IoC container to automatically detect and register the class as a bean during component scanning. @Component public class UserRole { @Value("1") private Long userId; @Value("user_role_admin") private String roleName; @Value("administrative role& ...

Posted on Tue, 29 Sep 2026 16:38:07 +0000 by wesmont

Integrating MyBatis with Spring Framework

MyBatis Fundamentals Database and Dependency Setup Create a database table: CREATE TABLE tb_user ( id INT PRIMARY KEY AUTO_INCREMENT, username VARCHAR(20), password VARCHAR(20), gender CHAR(1), addr VARCHAR(30) ); INSERT INTO tb_user VALUES (1, 'zhangsan', '123', '男', '北京'); INSERT INTO tb_user VALUES (2, '李四', '234', '女', '天津'); INSE ...

Posted on Sat, 26 Sep 2026 16:37:52 +0000 by exeterdad