Skip to content

Commit

Permalink
🗑️ address rename properties and cleanup auto conf
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhir committed Sep 5, 2024
1 parent bf2ae72 commit 9d9173a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,43 +11,26 @@
import de.muenchen.refarch.integration.address.client.api.AddressGermanyApi;
import de.muenchen.refarch.integration.address.client.api.AddressMunichApi;
import de.muenchen.refarch.integration.address.client.api.StreetsMunichApi;
import de.muenchen.refarch.integration.address.client.impl.AddressGermanyImpl;
import de.muenchen.refarch.integration.address.client.impl.AddressesMunichImpl;
import de.muenchen.refarch.integration.address.client.impl.StreetsMunichImpl;
import de.muenchen.refarch.integration.address.properties.AddressServiceIntegrationProperties;
import de.muenchen.refarch.integration.address.client.gen.ApiClient;
import de.muenchen.refarch.integration.address.client.gen.api.AdressenBundesweitApi;
import de.muenchen.refarch.integration.address.client.gen.api.AdressenMnchenApi;
import de.muenchen.refarch.integration.address.client.gen.api.StraenMnchenApi;
import de.muenchen.refarch.integration.address.client.impl.AddressGermanyImpl;
import de.muenchen.refarch.integration.address.client.impl.AddressesMunichImpl;
import de.muenchen.refarch.integration.address.client.impl.StreetsMunichImpl;
import de.muenchen.refarch.integration.address.properties.AddressServiceIntegrationProperties;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.web.reactive.function.client.WebClient;

@Configuration
@RequiredArgsConstructor
@ComponentScan(
basePackages = "de.muenchen.oss.digiwf.address.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 AddressServiceIntegrationAutoConfiguration}
* to give the bean another name.
*/
ApiClient.class,
AdressenBundesweitApi.class,
AdressenMnchenApi.class,
StraenMnchenApi.class
}
)
}
basePackages = "de.muenchen.refarch.integration.address"
)
@EnableConfigurationProperties(AddressServiceIntegrationProperties.class)
public class AddressServiceIntegrationAutoConfiguration {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
package de.muenchen.refarch.integration.address.properties;

import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;

import jakarta.validation.constraints.NotBlank;

@Getter
@Setter
@Validated
@ConfigurationProperties(prefix = "de.muenchen.oss.digiwf.address.service")
@ConfigurationProperties(prefix = "refarch.address")
public class AddressServiceIntegrationProperties {

@NotBlank
Expand Down

0 comments on commit 9d9173a

Please sign in to comment.