Skip to content

Commit a215ff7

Browse files
committed
update documentation for aspectj
1 parent 41d7ef3 commit a215ff7

File tree

1 file changed

+33
-8
lines changed

1 file changed

+33
-8
lines changed

Diff for: README.md

+33-8
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ Powertools for AWS Lambda (Java) is a developer toolkit to implement Serverless
99
1010
**[📜Documentation](https://docs.powertools.aws.dev/lambda-java/)** | **[Feature request](https://github.com/aws-powertools/powertools-lambda-java/issues/new?assignees=&labels=feature-request%2C+triage&template=feature_request.md&title=)** | **[🐛Bug Report](https://github.com/aws-powertools/powertools-lambda-java/issues/new?assignees=&labels=bug%2C+triage&template=bug_report.md&title=)** | **[Detailed blog post](https://aws.amazon.com/blogs/opensource/simplifying-serverless-best-practices-with-aws-lambda-powertools-java/)**
1111

12-
### Java Compatibility
13-
Powertools for AWS Lambda (Java) supports all Java version from 8 up to 21 as well as the
14-
[corresponding Lambda runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).
15-
16-
AspectJ does not yet support Java 21 [[1]](https://github.com/eclipse-aspectj/aspectj/issues/260), [[2]](https://github.com/eclipse-aspectj/aspectj/blob/master/docs/dist/doc/JavaVersionCompatibility.md).
17-
If you need to use aspects - either Powertools features leveraging aspects or other libraries - you should use the JDK 17 compiler and target either the Java 17 or Java 21
18-
Lambda runtimes.
19-
2012
### Installation
2113

2214
Powertools for AWS Lambda (Java) is available in Maven Central. You can use your favourite dependency management tool to install it
@@ -196,6 +188,39 @@ Next, configure the aspectj-maven-plugin to compile-time weave (CTW) the aws-lam
196188
```
197189
</details>
198190

191+
#### Java Compatibility
192+
Powertools for AWS Lambda (Java) supports all Java version from 8 up to 21 as well as the
193+
[corresponding Lambda runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).
194+
195+
For the following modules, Powertools for AWS Lambda (Java) leverages the **aspectj** library to provide annotations:
196+
- Logging
197+
- Metrics
198+
- Tracing
199+
- Parameters
200+
- Idempotency
201+
- Validation
202+
- Large messages
203+
204+
It's important to notice the [dependency matrix](https://github.com/eclipse-aspectj/aspectj/blob/master/docs/dist/doc/JavaVersionCompatibility.md) between this library and the JDK:
205+
206+
| JDK version | aspectj version |
207+
|-------------|-----------------|
208+
| `1.8` | `1.9.7` |
209+
| `11-17` | `1.9.20.1` |
210+
| `21` | `1.9.21` |
211+
212+
_Note: 1.9.21 is not yet available and Java 21 not yet officialy supported by aspectj, but you can already use the `1.9.21.M1`_
213+
214+
You may need to add the good version of `aspectjrt` to your dependencies based on the jdk used for building your function:
215+
216+
```xml
217+
<dependency>
218+
<groupId>org.aspectj</groupId>
219+
<artifactId>aspectjrt</artifactId>
220+
<version>1.9.??</version>
221+
</dependency>
222+
```
223+
199224
## Examples
200225

201226
See the latest release of the **[examples](https://github.com/aws-powertools/powertools-lambda-java/tree/v1.18.0/examples)** for example projects showcasing usage of different utilities.

0 commit comments

Comments
 (0)