Skip to content

Commit 1baf1ea

Browse files
authored
Docs/spring security (#27)
* GH-3: docs: Add spring-security to FAQ * docs: Simplify quickstart * docs: Fix link in FAQ
1 parent 4d946c9 commit 1baf1ea

File tree

2 files changed

+25
-23
lines changed

2 files changed

+25
-23
lines changed

docs/faq.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@ Yes, you can use springwolf for private and commercial purposes as long as you c
1616

1717
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).
1818

19-
If not, check
20-
1. the spring `context-path` setting
21-
2. if static assets are being served. See the code below:
22-
```java
23-
@Configuration
24-
public class WebConfig implements WebMvcConfigurer {
25-
26-
@Override
27-
public void addResourceHandlers(ResourceHandlerRegistry registry) {
28-
registry
29-
.addResourceHandler("/**")
30-
.addResourceLocations("classpath:/META-INF/resources/", "classpath:/resources/", "classpath:/static/", "classpath:/public/");
31-
}
32-
}
33-
```
34-
35-
Taken from [Discord Chat](https://discord.com/channels/950375987475005471/950375988217409548/1051909821848363038)
19+
If not, whether
20+
1. you customized the spring `context-path` setting
21+
2. static assets are being served at all. See the code below:
22+
```java
23+
@Configuration
24+
public class WebConfig implements WebMvcConfigurer {
25+
@Override
26+
public void addResourceHandlers(ResourceHandlerRegistry registry) {
27+
registry
28+
.addResourceHandler("/**")
29+
.addResourceLocations("classpath:/META-INF/resources/", "classpath:/resources/", "classpath:/static/", "classpath:/public/");
30+
}
31+
}
32+
```
33+
34+
Taken from [Discord Chat](https://discord.com/channels/950375987475005471/950375988217409548/1051909821848363038)
35+
3. spring-security (or similar) denies access the urls (HTTP 403). Check `CustomWebSecurityConfigurerAdapter` in springwolf-kafka-example.
3636

3737
### Unable to publish message from the UI
3838

@@ -92,5 +92,5 @@ This is expected, as there are use-cases where different payloads are sent via t
9292

9393
Springwolf uses on scanners to find all consumer and producers in your application.
9494
Most likely two scanners found your consumer/producer each.
95-
See [configuration](configuration/configuration.md) to disable scanners.
95+
See [configuration](configuration.md) to disable scanners.
9696

docs/quickstart.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import CodeSpringwolfMaven from '!!raw-loader!./snippets/_springwolf_maven.md';
1111

1212
*The following instructions are for Kafka services - but amqp services configuration is almost identical. Check out the [example project for complete examples](https://github.com/timonback/springwolf-core/tree/master/springwolf-examples).*
1313

14-
## Dependencies
14+
## 1. Add dependencies
1515

1616
Add the following dependencies:
1717

@@ -30,9 +30,9 @@ Latest version:
3030
- ![Maven Central](https://img.shields.io/maven-central/v/io.github.springwolf/springwolf-kafka?color=green&label=springwolf-kafka&style=plastic)
3131
- ![Maven Central](https://img.shields.io/maven-central/v/io.github.springwolf/springwolf-ui?color=green&label=springwolf-ui&style=plastic)
3232

33-
## Configuration properties
33+
## 2. Configure properties
3434

35-
Add the following to your application.properties
35+
Add the following to your application.properties:
3636

3737
```properties
3838
springwolf.docket.base-package=io.github.stavshamir.springwolf.example.consumers
@@ -46,8 +46,10 @@ springwolf.docket.servers.kafka.url=${kafka.bootstrap.servers:localhost:29092}
4646

4747
*Make sure to change the value of `springwolf.docket.base-package` to the package containing your listeners, so that springwolf will automatically pick them up.*
4848

49-
## View the docs
50-
After starting the application, visit `<host>:<port>/springwolf/asyncapi-ui.html` to view the UI or `<host>:<port>/springwolf/docs` to view the raw AsyncAPI document.
49+
## 3. View the docs
50+
Start the application and open the urls in your browser:
51+
- AsyncApi: [`<host>:<port>/springwolf/docs`](http://localhost:8080/springwolf/docs)
52+
- UI: [`<host>:<port>/springwolf/asyncapi-ui.html`](http://localhost:8080/springwolf/asyncapi-ui.html)
5153

5254
If you configured a different context path in your application, make sure to prepend it to springwolf urls, i.e. `<host>:<port>/<context-path>/springwolf/asyncapi-ui.html`
5355

0 commit comments

Comments
 (0)