Skip to content

Feat 2.3.0 Release Notes

Choose a tag to compare

@smthing smthing released this 01 Aug 11:43
· 120 commits to master since this release

✨ New Features

Method Interceptor

Feat Cloud now supports method interceptors with compile-time (AOT) generated invocation chains — zero proxy, zero reflection at runtime.

  • Added @Interceptor annotation to declare interceptor classes
  • Added @AroundInvoke annotation to mark around-invoke methods
  • Added @Interceptors annotation to bind interceptors to classes or methods
  • Supports class-level and method-level interceptor stacking; method-level interceptors are appended after class-level ones
  • Interceptor chains follow the onion model: enter in declaration order, return in reverse order
  • Optimized exception handling in interceptor chains and improved AOT serialization support

⚠️ Note: After adding, removing, or modifying @Interceptor, @AroundInvoke, or @Interceptors, you must re-run mvn compile or repackage the project to regenerate AOT code.

Examples & Documentation

  • Added Nacos configuration center integration example, covering multi-environment configuration and dynamic refresh usage

🔧 Improvements

HTTP

  • Optimized PostInputStream read logic; fixed potential StackOverflowError when reading the complete request body
  • Adjusted async request body read buffer logic to improve read performance for small-body scenarios

Dependencies

  • Upgraded smart-socket to 2.1.3

⚠️ Breaking Changes & Compatibility Notes

@Bean Default Loading Order Adjustment

The default order of @Bean has changed from 0 to Byte.MAX_VALUE. If infrastructure beans need to initialize earlier, explicitly set a smaller order value:

@Bean(order = 0)
public class NacosConfigService {
}

Method Interceptor AOT Compilation Requirement

Method interceptors rely on compile-time code generation. After using interceptors, please recompile your project to ensure the latest AOT code is generated.


📋 Upgrade Guide

  1. Update the version number
<feat.version>2.3.0</feat.version>
  1. Check Bean initialization order

If your project has infrastructure beans that depend on initialization order, explicitly declare the order value.

  1. Recompile AOT generated code

If you are using method interceptors, run mvn compile or repackage the project to ensure the AOT code is up to date.


📊 Change Impact Quick Reference

Change Impact Action Required
@Bean default order Default Bean initialization order changed from 0 to Byte.MAX_VALUE Explicitly declare order for beans with initialization order dependencies
Method Interceptor New compile-time AOT capability; does not affect applications not using interceptors Recompile to regenerate code after using interceptors
smart-socket version Default dependency upgraded to 2.1.3 If your project explicitly pins the smart-socket version, consider upgrading in sync

📎 Related Links


Feat follows Semantic Versioning: MAJOR.MINOR.PATCH