Tag

Custom Annotation

1 views collected around this technical thread.

Java Tech Enthusiast
Java Tech Enthusiast
Apr 29, 2025 · Backend Development

Implementing Data Isolation with MyBatis Interceptor and Custom Annotations

The article describes how to enforce environment‑based data isolation in a shared database by adding an env column, using a MyBatis interceptor to inject and filter this field at runtime, and employing a custom @InvokeChainSkipEnvRule annotation with AOP to selectively bypass the rule, keeping existing code untouched.

AOPCustom AnnotationData Isolation
0 likes · 9 min read
Implementing Data Isolation with MyBatis Interceptor and Custom Annotations
Architecture Digest
Architecture Digest
Apr 24, 2025 · Backend Development

Configurable Data Desensitization in Spring Boot Using Custom Annotations and Serializer

This article demonstrates how to create a configurable data‑masking solution for Spring Boot APIs by defining a custom @DataMasking annotation, implementing masking strategies, building a custom Jackson serializer, integrating it via an AnnotationIntrospector, and testing the functionality with a sample controller.

Custom AnnotationJavaSerializer
0 likes · 8 min read
Configurable Data Desensitization in Spring Boot Using Custom Annotations and Serializer
Java Captain
Java Captain
Apr 22, 2025 · Backend Development

Using Custom Annotations, Abstract Classes, and Interfaces in Spring Backend Development

This article demonstrates how to create and apply custom Spring annotations for AOP logging, implements the corresponding aspect, and discusses the strategic use of abstract classes and interfaces to separate business logic from data access in both MongoDB and MySQL contexts.

AOPAbstract ClassCustom Annotation
0 likes · 8 min read
Using Custom Annotations, Abstract Classes, and Interfaces in Spring Backend Development
Java Captain
Java Captain
Apr 22, 2025 · Backend Development

Implementing Data Isolation with MyBatis Interceptor and Custom Annotations in Java

This article describes how to achieve multi‑environment data isolation in a Java backend by adding an env field to tables, using a MyBatis interceptor with JSqlParser to rewrite SQL, and applying custom annotations and AOP to control environment‑specific logic while preserving existing business code.

Custom AnnotationData IsolationInterceptor
0 likes · 9 min read
Implementing Data Isolation with MyBatis Interceptor and Custom Annotations in Java
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Apr 14, 2025 · Backend Development

Master API Timeout in Spring Boot 3 with Custom @Timeout Annotation and AOP

This article demonstrates how to solve Spring Boot API timeout issues by creating a custom @Timeout annotation combined with an AOP aspect, covering annotation definition, aspect implementation, executor handling, fallback logic, configuration, and practical test results.

AOPAPI timeoutCustom Annotation
0 likes · 10 min read
Master API Timeout in Spring Boot 3 with Custom @Timeout Annotation and AOP
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Feb 12, 2025 · Backend Development

Master Spring Boot 3 Conditional Annotations with Real‑World Examples

This article introduces a continuously updated Spring Boot 3 case collection and PDF e‑book, then dives into the @Conditional annotation, custom condition interfaces, parameterized enhancements, SpringBootCondition usage, and multi‑condition combinations, providing complete code examples and test results.

Custom AnnotationJavaSpring Boot
0 likes · 9 min read
Master Spring Boot 3 Conditional Annotations with Real‑World Examples
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Nov 5, 2024 · Backend Development

Solve Long Precision Loss in Spring Boot 3 with Jackson and Custom Annotations

This article demonstrates how to handle Java Long precision loss in Spring Boot 3 front‑end displays, configures Jackson to serialize Long as String, uses @JsonValue for single‑property serialization, and creates custom annotations with a SensitiveSerializer for data masking, complete with code examples and screenshots.

Custom AnnotationJSON serializationJackson
0 likes · 9 min read
Solve Long Precision Loss in Spring Boot 3 with Jackson and Custom Annotations
Java Architect Essentials
Java Architect Essentials
Sep 26, 2024 · Backend Development

Implementing Interface Rate Limiting in Spring Boot Using Interceptor, Redis, and Custom Annotations

This article demonstrates how to build a flexible API rate‑limiting solution in Spring Boot by combining a HandlerInterceptor, Redis counters, and custom annotations with reflection, covering configuration, code examples, mapping rules, time‑window nuances, path‑parameter handling, and real‑IP considerations.

Custom AnnotationInterceptorJava
0 likes · 18 min read
Implementing Interface Rate Limiting in Spring Boot Using Interceptor, Redis, and Custom Annotations
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Aug 22, 2024 · Backend Development

Master Jackson Annotations in Spring Boot 3.2.5: From @JsonAnyGetter to Custom Annotations

This tutorial explores Jackson's rich annotation set in Spring Boot 3.2.5, demonstrating how to serialize and deserialize JSON with built‑in annotations like @JsonAnyGetter, @JsonGetter, @JsonPropertyOrder, and @JsonIgnore, how to create custom annotations, and how to disable annotation processing for fine‑grained control.

AnnotationsCustom AnnotationJSON
0 likes · 13 min read
Master Jackson Annotations in Spring Boot 3.2.5: From @JsonAnyGetter to Custom Annotations
Architecture Digest
Architecture Digest
Jul 5, 2024 · Backend Development

Implementing Data Permission Interceptor in MyBatis-Plus with Custom Annotations

This tutorial explains how to globally enforce data‑permission filtering in MyBatis‑Plus by creating a custom @UserDataPermission annotation, implementing an InnerInterceptor that modifies SQL WHERE clauses based on user roles, and configuring the interceptor within the MyBatis‑Plus plugin system.

Backend DevelopmentCustom AnnotationData Permission
0 likes · 11 min read
Implementing Data Permission Interceptor in MyBatis-Plus with Custom Annotations
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jun 30, 2024 · Backend Development

Simplify JWT Retrieval in Spring Boot Controllers with a Custom Argument Resolver

This article demonstrates how to create a custom HandlerMethodArgumentResolver in Spring Boot that automatically extracts JWT token data and injects the corresponding user object—or selected fields—directly into controller method parameters, reducing boilerplate and improving code readability.

Custom AnnotationHandlerMethodArgumentResolverJWT
0 likes · 8 min read
Simplify JWT Retrieval in Spring Boot Controllers with a Custom Argument Resolver
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jun 13, 2024 · Backend Development

Comprehensive Guide to Parameter Validation in Spring Boot Backend Development

This article explains why parameter validation is essential in Java web development, compares traditional manual checks with validator libraries, demonstrates practical usage of Bean Validation, Hibernate‑Validator, and Spring Boot starter‑validation, and covers advanced topics such as nested validation, group validation, custom constraints, and the underlying validation mechanism.

Custom AnnotationHibernate ValidatorJava
0 likes · 32 min read
Comprehensive Guide to Parameter Validation in Spring Boot Backend Development
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
May 29, 2024 · Backend Development

How to Build a Custom Annotation‑Based Data Formatter in Spring Boot

This tutorial demonstrates how to create a custom annotation and formatter in Spring Boot 3.2.5 to automatically convert request parameters like "666,China" into a User object, covering the required interfaces, implementation, registration, and testing with code examples and screenshots.

AnnotationFormatterFactoryCustom AnnotationData Formatter
0 likes · 6 min read
How to Build a Custom Annotation‑Based Data Formatter in Spring Boot
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
May 17, 2024 · Backend Development

Master Spring @Qualifier: Resolve Bean Ambiguity with Custom Annotations

This guide explains how Spring's @Qualifier annotation eliminates bean injection ambiguities, shows basic usage, custom qualifier creation, generic qualifiers, fully custom annotations, and advanced attribute‑based qualifiers, all illustrated with clear Java code examples for Spring 6.1.2.

Custom AnnotationJavaQualifier
0 likes · 7 min read
Master Spring @Qualifier: Resolve Bean Ambiguity with Custom Annotations
Architect's Guide
Architect's Guide
May 4, 2024 · Backend Development

Data Isolation and Environment Switching in MyBatis Using a Custom Interceptor and Annotations

This article describes how to achieve database environment isolation and flexible data sharing in a Java backend by adding an env field, customizing a MyBatis interceptor to rewrite SQL, and defining reusable annotations to control environment filtering across services.

Custom AnnotationData IsolationInterceptor
0 likes · 9 min read
Data Isolation and Environment Switching in MyBatis Using a Custom Interceptor and Annotations
Java Architect Essentials
Java Architect Essentials
Apr 9, 2024 · Backend Development

Implementing Data Isolation in Java Applications Using MyBatis Interceptor and Custom Annotations

This article describes a Java data isolation solution that adds an 'env' field to tables, uses a MyBatis interceptor to rewrite SQL for environment‑aware queries, and introduces custom annotations with AOP to selectively skip environment checks, detailing implementation, challenges, and best practices.

AOPCustom AnnotationData Isolation
0 likes · 13 min read
Implementing Data Isolation in Java Applications Using MyBatis Interceptor and Custom Annotations
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Mar 1, 2024 · Backend Development

How to Precisely Choose a DAO Implementation in Spring: 8 Injection Techniques

This article explains eight practical ways to control which DAO implementation Spring injects, covering @Qualifier, bean naming, custom qualifiers, manual lookup, profile‑based beans, @Primary, and @Priority, with complete code examples for each method.

Custom AnnotationPrimaryQualifier
0 likes · 7 min read
How to Precisely Choose a DAO Implementation in Spring: 8 Injection Techniques
Java Captain
Java Captain
Feb 26, 2024 · Backend Development

Parameter Validation in Spring Boot: @Valid, @Validated, and Custom Annotations

Spring Boot offers several ways to validate request parameters—including the @Valid and @Validated annotations and custom validation annotations—each with its own strengths, allowing developers to enforce data integrity, improve code quality, and enhance user experience across different scenarios.

@Valid@ValidatedCustom Annotation
0 likes · 11 min read
Parameter Validation in Spring Boot: @Valid, @Validated, and Custom Annotations
Selected Java Interview Questions
Selected Java Interview Questions
Feb 25, 2024 · Information Security

Custom Authorization Annotations in Spring Security: Design, Implementation, and Usage

This article explores how to create and use custom authorization annotations in Spring Security to achieve more flexible, expressive, and maintainable permission checks, covering the basics of Spring Security, advantages of custom annotations, step‑by‑step implementation, and additional use‑case scenarios.

AuthorizationCustom AnnotationJava
0 likes · 9 min read
Custom Authorization Annotations in Spring Security: Design, Implementation, and Usage
Top Architect
Top Architect
Jan 26, 2024 · Backend Development

Using Spring Expression Language (SpEL) for Flexible Permission Control in Spring Boot

This article demonstrates how to integrate Spring Expression Language (SpEL) with custom annotations and AOP in Spring Boot to create a highly flexible, maintainable permission‑checking mechanism that can handle various complex access scenarios without scattering hard‑coded logic throughout the codebase.

AspectCustom AnnotationJava
0 likes · 11 min read
Using Spring Expression Language (SpEL) for Flexible Permission Control in Spring Boot