Skip to content
Browse files

No need for open keyword if you are not a @configuration

  • Loading branch information...
mikegehard committed Dec 22, 2015
1 parent 6e810d0 commit a9045e1968193fc70b4c43a330fde265b3325f7a
Showing with 5 additions and 4 deletions.
  1. +5 −4 applications/billing/src/main/kotlin/com/example/billing/Application.kt
@@ -1,15 +1,16 @@
package com.example.billing

import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.context.annotation.ComponentScan

// This class must not be final or Spring Boot is not happy.
open class Application {
class Application {
companion object {
@JvmStatic fun main(args: Array<String>) {, *args)

1 comment on commit a9045e1


This comment has been minimized.

Copy link

commented on a9045e1 Nov 20, 2017

I come here from your wonderful post The Journey of a Spring Boot application from Java 8 to Kotlin. Kotlin has already provided a corresponding plugin to omit this annoying open keyword before @configuration classes as well as @bean methods. Hope it can help.

Please sign in to comment.
You can’t perform that action at this time.