generated from MEITREX/template_microservice
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
37 additions
and
10 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...unistuttgart/iste/meitrex/assignment_service/config/CourseServiceClientConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package de.unistuttgart.iste.meitrex.assignment_service.config; | ||
|
||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.graphql.client.GraphQlClient; | ||
import org.springframework.graphql.client.HttpGraphQlClient; | ||
import org.springframework.web.reactive.function.client.WebClient; | ||
|
||
@Configuration | ||
public class CourseServiceClientConfiguration { | ||
|
||
@Value("${course_service.url}") | ||
private String courseServiceUrl; | ||
|
||
@Bean | ||
public CourseServiceClient courseServiceClient() { | ||
final WebClient webClient = WebClient.builder().baseUrl(courseServiceUrl).build(); | ||
final GraphQlClient graphQlClient = HttpGraphQlClient.builder(webClient).build(); | ||
return new CourseServiceClient(graphQlClient); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters