Skip to content

Commit

Permalink
chore(*): Use SprintBootApplication annotation on Main class (spinnak…
Browse files Browse the repository at this point in the history
…er#838)

This annotation is useful as a way of consistently obtaining the Main class package in our services so we can determine package information, like version, at runtime.
  • Loading branch information
jonsie authored Aug 19, 2020
1 parent d2d216a commit 41ef2a3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions igor-web/src/main/groovy/com/netflix/spinnaker/igor/Main.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,26 @@ package com.netflix.spinnaker.igor

import com.netflix.spinnaker.kork.boot.DefaultPropertiesBuilder
import com.netflix.spinnaker.kork.configserver.ConfigServerBootstrap
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAutoConfiguration
import org.springframework.boot.builder.SpringApplicationBuilder
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
import sun.net.InetAddressCachePolicy

import java.security.Security

/**
* Application entry point.
*/
@Configuration
@EnableAutoConfiguration(exclude = [GroovyTemplateAutoConfiguration])
@EnableConfigurationProperties(IgorConfigurationProperties)
@ComponentScan(['com.netflix.spinnaker.config', 'com.netflix.spinnaker.igor'])
@SpringBootApplication(
scanBasePackages = [
"com.netflix.spinnaker.config",
"com.netflix.spinnaker.igor"
],
exclude = [GroovyTemplateAutoConfiguration]
)
class Main extends SpringBootServletInitializer {

static final Map<String, Object> DEFAULT_PROPS = new DefaultPropertiesBuilder().property("spring.application.name", "igor").build()
Expand Down

0 comments on commit 41ef2a3

Please sign in to comment.