Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(web): clean up for spring property setup #1606

Merged
merged 1 commit into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gate-web/gate-web.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies {
implementation "io.spinnaker.fiat:fiat-core:$fiatVersion"
implementation "io.spinnaker.fiat:fiat-api:$fiatVersion"

implementation "io.spinnaker.kork:kork-config"
implementation "io.spinnaker.kork:kork-plugins"
implementation "io.spinnaker.kork:kork-web"
implementation "com.netflix.frigga:frigga"
Expand Down
11 changes: 2 additions & 9 deletions gate-web/src/main/groovy/com/netflix/spinnaker/gate/Main.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration
import org.springframework.boot.builder.SpringApplicationBuilder
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.scheduling.annotation.EnableAsync
import com.netflix.spinnaker.kork.boot.DefaultPropertiesBuilder

@EnableAsync
@EnableConfigurationProperties
Expand All @@ -41,15 +42,7 @@ import org.springframework.scheduling.annotation.EnableAsync
)
class Main {

static final Map<String, String> DEFAULT_PROPS = [
'netflix.environment': 'test',
'netflix.account': '${netflix.environment}',
'netflix.stack': 'test',
'spring.config.additional-location': '${user.home}/.spinnaker/',
'spring.application.name': 'gate',
'spring.config.name': 'spinnaker,${spring.application.name}',
'spring.profiles.active': '${netflix.environment},local'
]
static final Map<String, String> DEFAULT_PROPS = new DefaultPropertiesBuilder().property("spring.application.name", "gate").build()

static void main(String... args) {
new SpringApplicationBuilder().properties(DEFAULT_PROPS).sources(Main).run(args)
Expand Down