Closed
Description
Working with the documentation and trying to get something compiling can be pretty painful when code samples in docs do not include imports. This especially so when statically imported methods are being imported.
This is the section in the docs I'm particularly fighting with at the moment:
https://docs.spring.io/spring-security/site/docs/current/reference/html/test-webflux.html
@Before
public void setup() {
this.rest = WebTestClient
.bindToApplicationContext(this.context)
// add Spring Security test Support
.apply(springSecurity())
.configureClient()
.filter(basicAuthentication())
.build();
}
Where are the methods 'springSecurity()' and 'basicAuthentication()' defined?
I appreciate the desire to keep the snippets focussed and leave out 'unnecessary cruft'. But I think imports are rather crucial when you want to copy paste sample code from the docs and get it to compile properly.