Skip to content

Commit

Permalink
Use constructor injection in getting started reactive guide
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Mar 26, 2021
1 parent 8b84160 commit ab1c30e
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,9 @@
@Path("/fruit-data")
public class ResourceUsingWebClient {

@Inject
Vertx vertx;
private final WebClient client;

private WebClient client;

@PostConstruct
void initialize() {
public ResourceUsingWebClient(Vertx vertx) {
this.client = WebClient.create(vertx,
new WebClientOptions().setDefaultHost("fruityvice.com").setDefaultPort(443).setSsl(true)
.setTrustAll(true));
Expand Down

0 comments on commit ab1c30e

Please sign in to comment.