forked from Onlineberatung/onlineBeratung-agencyService
-
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.
Merge pull request #51 from Onlineberatung/VIC-1651-make-api-clients-…
…stateless-for-agencyservice Vic 1651 make api clients stateless for agencyservice
- Loading branch information
Showing
23 changed files
with
197 additions
and
244 deletions.
There are no files selected for viewing
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
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
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
21 changes: 21 additions & 0 deletions
21
...e/caritas/cob/agencyservice/config/apiclient/ApplicationSettingsApiControllerFactory.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,21 @@ | ||
package de.caritas.cob.agencyservice.config.apiclient; | ||
|
||
import de.caritas.cob.agencyservice.applicationsettingsservice.generated.web.ApplicationsettingsControllerApi; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.web.client.RestTemplate; | ||
|
||
@Component | ||
public class ApplicationSettingsApiControllerFactory { | ||
|
||
@Value("${consulting.type.service.api.url}") | ||
private String applicationsettingsServiceApiUrl; | ||
|
||
@Autowired private RestTemplate restTemplate; | ||
|
||
public ApplicationsettingsControllerApi createControllerApi() { | ||
var apiClient = new ApplicationSettingsApiClient(restTemplate).setBasePath(this.applicationsettingsServiceApiUrl); | ||
return new ApplicationsettingsControllerApi(apiClient); | ||
} | ||
} |
34 changes: 0 additions & 34 deletions
34
...ava/de/caritas/cob/agencyservice/config/apiclient/ApplicationSettingsClientApiConfig.java
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
...itas/cob/agencyservice/config/apiclient/AppointmentServiceAgencyApiControllerFactory.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.caritas.cob.agencyservice.config.apiclient; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.web.client.RestTemplate; | ||
import de.caritas.cob.agencyservice.appointmentservice.generated.ApiClient; | ||
import de.caritas.cob.agencyservice.appointmentservice.generated.web.AgencyApi; | ||
|
||
@Component | ||
public class AppointmentServiceAgencyApiControllerFactory { | ||
|
||
@Value("${appointment.service.api.url}") | ||
private String appointmentServiceApiUrl; | ||
|
||
@Autowired | ||
private RestTemplate restTemplate; | ||
|
||
public AgencyApi createControllerApi() { | ||
var apiClient = new ApiClient(restTemplate).setBasePath(this.appointmentServiceApiUrl); | ||
return new de.caritas.cob.agencyservice.appointmentservice.generated.web.AgencyApi(apiClient); | ||
} | ||
} |
31 changes: 0 additions & 31 deletions
31
src/main/java/de/caritas/cob/agencyservice/config/apiclient/AppointmentsApiClientConfig.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.