Skip to content

Commit

Permalink
#768: clean AutoConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanStrehlerCGI committed Nov 30, 2023
1 parent 9874d52 commit e3f84a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<artifactId>openapi-generator-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-server-stubs</id>
<id>generate-okewo-client</id>
<goals>
<goal>generate</goal>
</goals>
Expand All @@ -64,7 +64,6 @@
<generateModelTests>false</generateModelTests>
<generateApiDocumentation>false</generateApiDocumentation>
<generateModelDocumentation>false</generateModelDocumentation>
<generateSupportingFiles>false</generateSupportingFiles>

<environmentVariables>
<supportingFiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,7 @@
@Configuration
@RequiredArgsConstructor
@ComponentScan(
basePackages = "de.muenchen.oss.digiwf.okewo.integration",
excludeFilters = {
@ComponentScan.Filter(
type = FilterType.ASSIGNABLE_TYPE,
classes = {
/**
* Exclude to avoid multiple instantiation of beans with same name.
* This class is instantiated in {@link OkEwoIntegrationAutoConfiguration}
* to give the bean another name.
*/
ApiClient.class,
PersonApi.class,
PersonErweitertApi.class
}
)
}
basePackages = "de.muenchen.oss.digiwf.okewo.integration"
)
@EnableConfigurationProperties(OkEwoIntegrationProperties.class)
public class OkEwoIntegrationAutoConfiguration {
Expand All @@ -50,7 +35,7 @@ public class OkEwoIntegrationAutoConfiguration {
*/
public ApiClient okEwoApiClient() {
final WebClient webClient = WebClient.builder()
.baseUrl(okEwoIntegrationProperties.getUrl().toString())
.baseUrl(okEwoIntegrationProperties.getUrl())
.filter(ExchangeFilterFunctions
.basicAuthentication(okEwoIntegrationProperties.getUsername(), okEwoIntegrationProperties.getPassword()))
.build();
Expand All @@ -61,7 +46,6 @@ public ApiClient okEwoApiClient() {
} catch (MalformedURLException exception) {
log.error("could not update base path of ApiClient because given url is malformed", exception);
}
// apiClient.setBasePath(this.okEwoIntegrationProperties.getUrl());
return apiClient;
}

Expand All @@ -87,14 +71,6 @@ public PersonErweitertApi okEwoPersonErweitertApi() {
return new PersonErweitertApi(apiClient);
}

// /**
// * @return a bean of type {@link PropertiesServiceTemplate} named by method name.
// */
// @Bean
// public PropertiesServiceTemplate propertiesService() {
// return new PropertiesServiceTemplate(this.okEwoIntegrationProperties.getBenutzerId());
// }

/**
* solution copied from https://github.com/swagger-api/swagger-codegen/issues/2916#issuecomment-220466457
* @param apiClientBasePath generated api base path of ApiClient
Expand Down

0 comments on commit e3f84a7

Please sign in to comment.