Skip to content

Commit

Permalink
refactor(gate-web): enable pipeline controller config props in GateCo…
Browse files Browse the repository at this point in the history
…nfg instead of GateWebConfig

GateWebConfig seems to exist more for spring specific configurations, whereas GateConfig is a general config for the application beans/logic.
  • Loading branch information
Richard Timpson committed Aug 23, 2024
1 parent cac81bb commit 151437d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import com.netflix.spinnaker.fiat.shared.FiatPermissionEvaluator
import com.netflix.spinnaker.fiat.shared.FiatService
import com.netflix.spinnaker.fiat.shared.FiatStatus
import com.netflix.spinnaker.filters.AuthenticatedRequestFilter
import com.netflix.spinnaker.gate.config.controllers.PipelineControllerConfigProperties
import com.netflix.spinnaker.gate.converters.JsonHttpMessageConverter
import com.netflix.spinnaker.gate.converters.YamlHttpMessageConverter
import com.netflix.spinnaker.gate.filters.RequestLoggingFilter
Expand All @@ -51,6 +52,7 @@ import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.annotation.Value
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.boot.web.servlet.FilterRegistrationBean
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
Expand All @@ -71,6 +73,7 @@ import static retrofit.Endpoints.newFixedEndpoint
@CompileStatic
@Configuration
@Slf4j
@EnableConfigurationProperties([PipelineControllerConfigProperties.class])
@Import([PluginsAutoConfiguration, DeckPluginConfiguration, PluginWebConfiguration])
class GateConfig {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.netflix.spinnaker.gate.config

import com.netflix.spectator.api.Registry
import com.netflix.spinnaker.gate.config.controllers.PipelineControllerConfigProperties
import com.netflix.spinnaker.gate.filters.ContentCachingFilter
import com.netflix.spinnaker.gate.interceptors.RequestContextInterceptor
import com.netflix.spinnaker.gate.interceptors.ResponseHeaderInterceptor
Expand Down Expand Up @@ -48,7 +47,7 @@ import javax.servlet.http.HttpServletResponse

@Configuration
@ComponentScan
@EnableConfigurationProperties([ResponseHeaderInterceptorConfigurationProperties.class, PipelineControllerConfigProperties.class])
@EnableConfigurationProperties([ResponseHeaderInterceptorConfigurationProperties.class])
public class GateWebConfig implements WebMvcConfigurer {
@Autowired
Registry registry
Expand Down

0 comments on commit 151437d

Please sign in to comment.