Skip to content

Commit 183cded

Browse files
committed
- Add @Profile annotation to customRouteLocator bean to exclude it from test profiles.
#deploy-test-dolly-frontend
1 parent e725d09 commit 183cded

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

apps/dolly-frontend/src/main/java/no/nav/dolly/web/DollyFrontendApplicationStarter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
2525
import org.springframework.context.annotation.Bean;
2626
import org.springframework.context.annotation.Import;
27+
import org.springframework.context.annotation.Profile;
2728
import org.springframework.http.HttpHeaders;
2829
import org.springframework.web.server.ServerWebExchange;
2930
import reactor.core.publisher.Mono;
@@ -52,6 +53,7 @@ public class DollyFrontendApplicationStarter {
5253
};
5354

5455
@Bean("dollyFrontendRouteLocator")
56+
@Profile("!test")
5557
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.REACTIVE)
5658
public RouteLocator customRouteLocator(RouteLocatorBuilder builder) {
5759

0 commit comments

Comments
 (0)