73 lines
1.9 KiB
Kotlin
Raw Normal View History

2024-09-25 16:50:58 +09:00
package kr.lunaticbum.back.lun
2024-10-02 18:15:35 +09:00
import org.springframework.beans.factory.annotation.Value
2024-09-25 16:50:58 +09:00
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
2024-10-02 18:15:35 +09:00
import org.springframework.context.EnvironmentAware
import org.springframework.core.env.Environment
2024-09-25 18:24:47 +09:00
import org.springframework.scheduling.annotation.EnableScheduling
2024-10-02 18:15:35 +09:00
import org.springframework.stereotype.Component
2024-09-25 16:50:58 +09:00
2024-09-25 18:24:47 +09:00
@EnableScheduling // 추가
2024-09-25 16:50:58 +09:00
@SpringBootApplication
2024-10-02 18:15:35 +09:00
class LunApplication() {
2024-09-25 18:24:47 +09:00
}
2024-09-25 16:50:58 +09:00
2024-10-02 18:15:35 +09:00
//@Component
//class GEnv : EnvironmentAware {
// @Value("\${telegram.bot.key}")
// var telegramBotKey: String? = ""
//
// @Value("\${telegram.my.id}")
// var telegramMyId: String? = ""
//
// @Value("\${weather.api.key}")
// var weatherApiKey: String? = ""
//
//
// override fun setEnvironment(environment: Environment) {
// println ("telegramBotKey $telegramBotKey")
// println("telegramMyId $telegramMyId")
// println("weatherApiKey $weatherApiKey")
// }
//}
2024-09-25 16:50:58 +09:00
fun main(args: Array<String>) {
2024-10-02 18:15:35 +09:00
// val props = System.getProperties()
// val enumerator = props.keys()
// while (enumerator.hasMoreElements()) {
// val ele = enumerator.nextElement()
// val key = ele.toString()
// println(key + ": " + System.getProperty(key))
// }
args.forEach {
println("main ARG >> $it")
}
2024-09-25 16:50:58 +09:00
runApplication<LunApplication>(*args)
}
//
//@SpringBootApplication
//class Application {
// @Bean
// fun commandLineRunner(ctx: ApplicationContext): CommandLineRunner {
// return CommandLineRunner { args: Array<String?>? ->
// println("Let's inspect the beans provided by Spring Boot:")
// val beanNames: Array<String> = ctx.getBeanDefinitionNames()
// Arrays.sort(beanNames)
// for (beanName in beanNames) {
// println(beanName)
// }
// }
// }
//
// companion object {
// @JvmStatic
// fun main(args: Array<String>) {
// SpringApplication.run(Application::class.java, *args)
// }
// }
//}