Implementing Soft Delete with MyBatis Interceptor
@Intercepts({
@Signature(type = StatementHandler.class, method = "prepare", args = {Connection.class, Integer.class})
})
@Component
public class SoftDeleteInterceptor implements Interceptor {
@Override
public Object intercept(Invocation invocation) throws Throwable {
StatementHandler handler = (StatementHandler) in ...
Posted on Fri, 19 Jun 2026 16:59:07 +0000 by vornn
Implementing Custom Extension Buttons in NC65 UAP Environment
Defining the Action Class
Create a new Java class that extends nc.ui.uif2.NCAction. This class will contain the logic for your custom button. Ensure you have references to the model and editor components to interact with the UI state.
package nc.ui.yrdmd.yrdsellorder.plugin.action;
import java.awt.event.ActionEvent;
import nc.ui.pub.beans.Mes ...
Posted on Thu, 18 Jun 2026 17:21:51 +0000 by airric
Diagnosing NoClassDefFoundError: A Static Initialization Pitfall
A production alert came in at midnight while the on-call engineer was asleep. After connecting to the environment, it became clear that one microservice was experiencing a steady increase in file descriptor usage, eventually leading to an OutOfMemoryError and service crash. This microservice establishes SSH connections during operation, and sin ...
Posted on Wed, 17 Jun 2026 17:35:17 +0000 by zeberdeee
Invoking REST Endpoints That Return JSON Arrays with Spring RestTemplate
Setting Up the HTTP Client
A customized RestTemplate bean provides fine-graineed control over connection behavior. The configuration below binds a request factory with a timeout setting.
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.SimpleC ...
Posted on Wed, 10 Jun 2026 18:20:25 +0000 by jdh
Understanding Java Annotations: Mechanics, Design, and Real-World Usage
Java annotations are a foundational language feature that enable declarative programming—allowing developers to embed metadata directly into source code without altering runtime behavior. This capability powers frameworks, simplifies configuration, and enables compile-time and runtime introspection.
Core Concepts
An annotation is a special kind ...
Posted on Wed, 10 Jun 2026 17:45:25 +0000 by compt
Spring Framework: Annotation-Based Development, Third-Party Bean Management, and Integration with MyBatis and JUnit
Managing Third-Party Beans with IoC/DI Configuration
=======================================================
This section demonstrates how to manage third-party beans using Spring's Inversion of Control (IoC) container. We'll use DruidDataSource and ComboPooledDataSource as examples.
1.1 Managing a Data Source Object
1.1.1 Environment Setup
...
Posted on Wed, 10 Jun 2026 17:28:27 +0000 by trellie
Implementing the Strategy Pattern with Spring Plugin
The Spring Plugin library provides a core interface for building plugin-based architectures:
package org.springframework.plugin.core;
public interface Plugin<S> {
boolean supports(S criteria);
}
Here is an implementation of this interface for a payment processing scenario. The PayByPaypal class defines the logic for PayPal transacti ...
Posted on Thu, 04 Jun 2026 18:05:00 +0000 by Pointybeard
Building and Deploying an SSM Backend Application with Maven and Tomcat
This article walks through creating a Java web backend using the SSM stack (Spring, Spring MVC, MyBatis) with Maven, packaging it as a WAR, and deploying it to Tomcat. Common configuration pitfalls are highlighted along the way.
1. Create a WAR‑based Maven project
Using your IDE, choose File → New → Maven Project → Create a simple project. Fill ...
Posted on Sun, 31 May 2026 15:59:27 +0000 by burn1337
Mastering Spring AOP Pointcut Expressions and the @Aspect Annotation
Understanding Spring AOP Proxies
When working with Spring AOP, it's crucial to understand that only method calls through Spring-managed beans will trigger aspect advice. Direct this calls bypass the proxy mechanism entirely, meaning aspects won't intercept them. This happens because service objects are injected as Spring proxies, which are sepa ...
Posted on Fri, 29 May 2026 22:48:47 +0000 by MajusC00L
Dependency Injection in the Spring IoC Container
A typical enterprise application consists of multiple objects working together, even the simplest applications require several components collaborating to present a coherent experience to end users.
Understanding Dependency Injection
Dependency Injection (DI) is a process whereby objects define their dependencies through constructor arguments, ...
Posted on Sun, 24 May 2026 19:56:40 +0000 by goodtimeassured