You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `base-package` is scanned for listeners and publishers.
19
+
20
+
In detail, Springwolf searches for `@Component` annotated classes (that includes `@Service` annotated classes) with methods annotated with `@AsyncListener`, `@AsyncPublisher`, `@JmsListener`, `@KafkaListener`, `@MessageMapping`, `@RabbitListener`, `@SqsListener`, etc.
21
+
Also, `@Configuration` classes are scanned for `@Bean` classes containing the previously mentioned annotations.
15
22
16
23
It's recommended to structure the project such that all consumers and producers (classes containing listener/producer methods) are in the same package - it's not mandatory, and if they're scattered across multiple packages, just provide the highest in hierarchy package that contains all classes.
17
24
18
25
You can add multiple base packages separated by commas.
19
26
20
-
The `base-package` will be scanned for classes containing `@Component` annotated classes (that includes `@Service` annotated classes) for methods annotated with `@JmsListener`, `@KafkaListener`, `MessageMapping`, `@RabbitListener`, `@SqsListener`, `@AsyncListener`, `@AsyncPublisher`, etc.
21
-
`@Configuration` classes are scanned for `@Bean` containing the previously mentioned annotations as well.
22
-
23
-
### `Info` (required)
27
+
### `Info`
24
28
25
29
The `Info` object provides metadata about the API (see [Info Object](https://www.asyncapi.com/docs/reference/specification/v3.0.0#infoObject)).
26
30
27
31
All provided fields will be present in the generated document, but not all will be displayed in the UI.
28
32
29
-
### `Servers` (required)
33
+
### `Servers`
30
34
31
35
The `Server` object provides metadata to help the reader understand the protocol, version, login details and more (see [AsyncAPI Server Object](https://www.asyncapi.com/docs/reference/specification/v3.0.0#serversObject)).
32
36
Any name (`kafka-server` in the example) can be chosen.
@@ -35,7 +39,7 @@ An AsyncAPI document can contain more than one server, but it's not common.
35
39
36
40
As with the `Info` object, all provided fields will be present in the generated document, but not all will be displayed in the UI.
37
41
38
-
## Additional `application.properties`
42
+
## Additional Properties
39
43
40
44
The following table contains additional properties that can be specified in the `application.properties` file:
41
45
@@ -81,7 +85,7 @@ The following table contains additional properties that can be specified in the
81
85
The AsyncAPI specification allows the definition of additional data fields to extend the
82
86
specification at certain points (see [Specification Extensions](https://www.asyncapi.com/docs/reference/specification/v3.0.0#specificationExtensions) ).
83
87
84
-
Extension Fields may be added to `Info`, `Contact`, `License` and `Server` objects both via`application.properties`.
88
+
Extension Fields may be added to `Info`, `Contact`, `License` and `Server` objects in`application.properties`.
85
89
Every custom extension field must begin with `x-`, for example `x-internal-id` (see sample configurations above).
Copy file name to clipboardExpand all lines: docs/configuration/customizing.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ public class TagCustomizer implements OperationCustomizer {
69
69
70
70
The `DefaultAsyncApiSerializerService` is responsible for serializing the AsyncAPI document into a `String` for the Controller.
71
71
72
-
Use `DefaultAsyncApiSerializerService#getJsonObjectMapper()` and `DefaultAsyncApiSerializerService#getYamlObjectMapper()` to customize the `ObjectMapper`.
72
+
Use `DefaultAsyncApiSerializerService#getJsonMapper()` and `DefaultAsyncApiSerializerService#getYamlMapper()` to customize the `ObjectMapper` (will change with migration to Jackson 3).
Copy file name to clipboardExpand all lines: docs/faq.md
+50-4Lines changed: 50 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,12 +29,51 @@ See [Static Generation](static-generation.md).
29
29
### Show `debug` output in the logs
30
30
31
31
Springwolf uses the default logging setup of Spring Boot.
32
-
To enable `DEBUG` output, add the following line to the `application.properties`:
32
+
To enable `DEBUG` output (`TRACE` for even more debugging), add the following line to the `application.properties`:
33
33
34
34
```properties
35
35
logging.level.io.github.springwolf=DEBUG
36
36
```
37
37
38
+
Log output:
39
+
```log
40
+
. ____ _ __ _ _
41
+
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
42
+
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
43
+
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
44
+
' |____| .__|_| |_|_| |_\__, | / / / /
45
+
=========|_|==============|___/=/_/_/_/
46
+
47
+
:: Spring Boot :: (v4.0.2)
48
+
49
+
INFO 1792 --- [Springwolf example project - Kafka] [ Test worker] i.g.s.examples.kafka.ApiIntegrationTest : Starting ApiIntegrationTest using Java 17.0.7 with PID 1792 (started by user in /springwolf-core/springwolf-examples/springwolf-kafka-example)
50
+
DEBUG 1792 --- [Springwolf example project - Kafka] [ Test worker] i.g.s.examples.kafka.ApiIntegrationTest : Running with Spring Boot v4.0.2, Spring v7.0.3
51
+
INFO 1792 --- [Springwolf example project - Kafka] [ Test worker] i.g.s.examples.kafka.ApiIntegrationTest : No active profile set, falling back to 1 default profile: "default"
52
+
INFO 1792 --- [Springwolf example project - Kafka] [ Test worker] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 0 (http)
53
+
INFO 1792 --- [Springwolf example project - Kafka] [ Test worker] o.apache.catalina.core.StandardService : Starting service [Tomcat]
54
+
INFO 1792 --- [Springwolf example project - Kafka] [ Test worker] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
55
+
INFO 1792 --- [Springwolf example project - Kafka] [ Test worker] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 522 ms
56
+
DEBUG 1792 --- [Springwolf example project - Kafka] [ Test worker] i.g.s.c.c.SpringwolfUiResourceConfigurer : Serving Springwolf with base-path: /springwolf
57
+
DEBUG 1792 --- [Springwolf example project - Kafka] [ Test worker] i.g.s.c.c.PublishingBaseController : Message publishing via SpringwolfKafkaController is active.
58
+
INFO 1792 --- [Springwolf example project - Kafka] [ Test worker] o.s.b.a.e.web.EndpointLinksResolver : Exposing 1 endpoint beneath base path '/actuator'
59
+
INFO 1792 --- [Springwolf example project - Kafka] [ Test worker] o.s.boot.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path '/'
60
+
INFO 1792 --- [Springwolf example project - Kafka] [ Test worker] i.g.s.examples.kafka.ApiIntegrationTest : Started ApiIntegrationTest in 1.461 seconds (process running for 2.123)
61
+
DEBUG 1792 --- [Springwolf example project - Kafka] [ Test worker] .g.s.c.SpringwolfInitApplicationListener : Triggering asyncapi creation
62
+
DEBUG 1792 --- [Springwolf example project - Kafka] [ Test worker] i.g.s.c.asyncapi.DefaultAsyncApiService : Building AsyncAPI document
63
+
DEBUG 1792 --- [Springwolf example project - Kafka] [ Test worker] i.g.s.c.a.s.c.a.AnnotationScannerUtil : Detected method io.github.springwolf.examples.kafka.consumers.ExampleClassLevelKafkaListener#receiveMonetaryAmount
64
+
...
65
+
DEBUG 1792 --- [Springwolf example project - Kafka] [ Test worker] i.g.s.c.a.s.c.a.AnnotationScannerUtil : Detected method io.github.springwolf.examples.kafka.consumers.AvroConsumer#receiveExampleAvroPayload
66
+
DEBUG 1792 --- [Springwolf example project - Kafka] [ Test worker] i.g.s.c.asyncapi.DefaultAsyncApiService : Starting customizer io.github.springwolf.addons.json_schema.JsonSchemaCustomizer
67
+
DEBUG 1792 --- [Springwolf example project - Kafka] [ Test worker] i.g.s.c.a.grouping.AsyncApiGroupService : Loaded AsyncApiGroup from configuration: AsyncApiGroup(groupName=Only Vehicles, groupInfo=Info(title=null, version=1.0.0, description=This group only contains endpoints that are related to vehicles., termsOfService=null, contact=null, license=null, tags=null, externalDocs=null), operationActionsToKeep=[], channelNamesToKeep=[], messageNamesToKeep=[.*Vehicle.*])
68
+
DEBUG 1792 --- [Springwolf example project - Kafka] [ Test worker] i.g.s.c.asyncapi.DefaultAsyncApiService : AsyncAPI document was built
69
+
INFO 1792 --- [Springwolf example project - Kafka] [o-auto-1-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
70
+
INFO 1792 --- [Springwolf example project - Kafka] [o-auto-1-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
71
+
INFO 1792 --- [Springwolf example project - Kafka] [o-auto-1-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms
72
+
DEBUG 1792 --- [Springwolf example project - Kafka] [o-auto-1-exec-1] i.g.s.c.controller.AsyncApiController : Returning AsyncApi document for group Only Vehicles
73
+
DEBUG 1792 --- [Springwolf example project - Kafka] [o-auto-1-exec-2] i.g.s.c.controller.AsyncApiController : Returning AsyncApi document for group default
74
+
DEBUG 1792 --- [Springwolf example project - Kafka] [o-auto-1-exec-3] i.g.s.c.a.grouping.AsyncApiGroupService : Loaded AsyncApiGroup from configuration: AsyncApiGroup(groupName=Only Vehicles, groupInfo=Info(title=null, version=1.0.0, description=This group only contains endpoints that are related to vehicles., termsOfService=null, contact=null, license=null, tags=null, externalDocs=null), operationActionsToKeep=[], channelNamesToKeep=[], messageNamesToKeep=[.*Vehicle.*])
75
+
```
76
+
38
77
### The Springwolf UI isn't showing
39
78
40
79
When the `springwolf-ui` dependency is added, the UI should be visible at [http://localhost:8080/springwolf/asyncapi-ui.html](http://localhost:8080/springwolf/asyncapi-ui.html).
@@ -62,7 +101,7 @@ If not, whether
62
101
### Unable to publish message from the UI
63
102
64
103
Publishing messages from the UI is disabled by default due to security concerns.
65
-
Springwolf doesn't offer authentication nor authorization, anyone can publish messages to (production) channels.
104
+
Springwolf doesn't offer authentication nor authorization, anyone can publish messages to channels (in production).
66
105
67
106
Check the [configuration](configuration/configuration.mdx) to enable this feature.
68
107
Be sure to enable fully qualified names ([`use-fqn`](configuration/configuration.mdx)) as well.
@@ -112,7 +151,7 @@ public void sendMessage(ListWrapper<String> msg) {}
112
151
WhenSpringwolf finds multiple consumers/producers for the same channel/topic, these are merged together.
113
152
This is expected, as there are use-cases where different payloads are sent via the same channel/topic.
114
153
115
-
Springwolf uses on scanners to find all consumer and producers in your application.
154
+
Springwolf uses scanners to find all consumer and producers in your application.
116
155
Most likely two scanners found your consumer/producer each.
117
156
See [configuration](configuration/configuration.mdx) to disable scanners.
118
157
@@ -131,7 +170,14 @@ See the [customization page](configuration/customizing.md)
131
170
Releases are managed in [GitHubReleases](https://github.com/springwolf/springwolf-core/releases),
132
171
which feature noteworthy changes, the full changelog and notes on how to migrate.
133
172
134
-
Since each release has a git _tag_, the [Springwolf examples for each plugin](https://github.com/springwolf/springwolf-core/blob/master/springwolf-examples) showcase the use of Springwolf for any previous version.
173
+
Since each release has a git [_tag_](https://github.com/springwolf/springwolf-core/tags),
174
+
the [Springwolf examples](https://github.com/springwolf/springwolf-core/blob/master/springwolf-examples) showcase the use of Springwolf for any version.
175
+
176
+
### IsSpringBoot 3.X supported
177
+
You can use an older version of Springwolf, which is build to support SpringBoot 3.X.
178
+
However, these versions don't get any updates.
179
+
180
+
Last version to support Spring Boot 3.X is `1.20.0` as Spring Boot 4 started the Springwolf 2.X release line.
135
181
136
182
### How to migrate from Springwolf 0.18.0 to 1.0.0
0 commit comments