Skip to content

Commit f9f227c

Browse files
phipagsvozza
andauthored
docs: Document new functional API (#2282)
* Initial version of documentation revamp adding functional API and usage patterns. * Update tracing docs highlighting functional API. * Update metrics docs highlighting functional API. * Update parameters docs highlithing functional approach. * Update validation docs highlithing functional API. * Update README.md Co-authored-by: Stefano Vozza <[email protected]> * Update docs/core/logging.md Co-authored-by: Stefano Vozza <[email protected]> * Update docs/core/logging.md Co-authored-by: Stefano Vozza <[email protected]> * Update docs/core/logging.md Co-authored-by: Stefano Vozza <[email protected]> * Update docs/core/logging.md Co-authored-by: Stefano Vozza <[email protected]> * Update docs/core/metrics.md Co-authored-by: Stefano Vozza <[email protected]> * Update docs/core/tracing.md Co-authored-by: Stefano Vozza <[email protected]> * Update docs/index.md Co-authored-by: Stefano Vozza <[email protected]> * Update docs/core/logging.md Co-authored-by: Stefano Vozza <[email protected]> * Update docs/utilities/idempotency.md Co-authored-by: Stefano Vozza <[email protected]> * Update docs/utilities/idempotency.md Co-authored-by: Stefano Vozza <[email protected]> --------- Co-authored-by: Stefano Vozza <[email protected]>
1 parent addad65 commit f9f227c

File tree

13 files changed

+1167
-332
lines changed

13 files changed

+1167
-332
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Powertools for AWS Lambda (Java) is available in Maven Central. You can use your
2626
</dependency>
2727
<dependency>
2828
<groupId>software.amazon.lambda</groupId>
29-
<artifactId>powertools-logging</artifactId>
29+
<artifactId>powertools-logging-log4j</artifactId>
3030
<version>2.6.0</version>
3131
</dependency>
3232
<dependency>
@@ -116,6 +116,7 @@ Next, configure the aspectj-maven-plugin to compile-time weave (CTW) the aws-lam
116116
aspect 'software.amazon.lambda:powertools-logging:{{ powertools.version }}'
117117
aspect 'software.amazon.lambda:powertools-tracing:{{ powertools.version }}'
118118
aspect 'software.amazon.lambda:powertools-metrics:{{ powertools.version }}'
119+
implementation 'software.amazon.lambda:powertools-logging-log4j:{{ powertools.version }}'
119120
implementation "org.aspectj:aspectjrt:1.9.22"
120121
}
121122
@@ -126,10 +127,10 @@ Next, configure the aspectj-maven-plugin to compile-time weave (CTW) the aws-lam
126127

127128

128129
### Java Compatibility
129-
Powertools for AWS Lambda (Java) supports all Java version from 11 up to 21 as well as the
130-
[corresponding Lambda runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).
130+
Powertools for AWS Lambda (Java) supports all Java versions from 11 to 25 in line with the [corresponding Lambda runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).
131+
131132
For the modules that provide annotations, Powertools for AWS Lambda (Java) leverages the **aspectj** library.
132-
You may need to add the good version of `aspectjrt` to your dependencies based on the JDK used for building your function:
133+
You may need to add the appropriate version of `aspectjrt` to your dependencies based on the JDK used for building your function:
133134

134135
```xml
135136
<dependency>
@@ -142,12 +143,13 @@ You may need to add the good version of `aspectjrt` to your dependencies based o
142143
<details>
143144
<summary><b>JDK - aspectj dependency matrix</b></summary>
144145

146+
Use the following [dependency matrix](https://github.com/eclipse-aspectj/aspectj/blob/master/docs/release/JavaVersionCompatibility.adoc) to understand which AspectJ version to use based on your JDK version:
147+
145148
| JDK version | aspectj version |
146149
|-------------|------------------------|
147150
| `11-17` | `1.9.20.1` (or higher) |
148151
| `21` | `1.9.21` (or higher) |
149-
150-
More info [here](https://github.com/aws-powertools/powertools-lambda-java/pull/1519/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R191).
152+
| `25` | `1.9.25` (or higher) |
151153

152154
</details>
153155

docs/FAQs.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ description: Frequently Asked Questions
77

88
Many utilities in this library use `aspectj-maven-plugin` to compile-time weave (CTW) aspects into the project. In case you want to use `Lombok` or other compile-time preprocessor for your project, it is required to change `aspectj-maven-plugin` configuration to enable in-place weaving feature. Otherwise the plugin will ignore changes introduced by `Lombok` and will use `.java` files as a source.
99

10+
Alternatively, you can use the [functional approach](./usage-patterns.md#functional-approach) which does not require AspectJ configuration.
11+
1012
To enable in-place weaving feature you need to use following `aspectj-maven-plugin` configuration:
1113

1214
```xml hl_lines="2-6"
@@ -31,6 +33,8 @@ To enable in-place weaving feature you need to use following `aspectj-maven-plug
3133
Many utilities use `aspectj-maven-plugin` to compile-time weave (CTW) aspects into the project. When using it with Kotlin projects, it is required to `forceAjcCompile`.
3234
No explicit configuration should be required for gradle projects.
3335

36+
Alternatively, you can use the [functional approach](./usage-patterns.md#functional-approach) which does not require AspectJ configuration.
37+
3438
To enable `forceAjcCompile` you need to use following `aspectj-maven-plugin` configuration:
3539

3640
```xml hl_lines="2"

0 commit comments

Comments
 (0)